Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GMAIL API: Get Label ID by Label Name

Tags:

gmail-api

How do you get the Label ID by Label Name?

I can get the Label ID by getting the list of Labels and parsing the response. But that looks a pretty inefficient way of doing it when I'm only interested in a particular label.

Is it possible to get Label ID directly be passing the Label Name?

like image 649
ND003 Avatar asked Jun 12 '15 12:06

ND003


1 Answers

No, you cannot. However, listing your labels is one of the least expensive API calls you can do, so no worries!

like image 120
Tholle Avatar answered Dec 17 '22 01:12

Tholle