unable to create a label in gmail api using javascript -


sorry being amateur @ please help,i trying create new label name news1 , code have done.

this function call have used.

createlabel(); 

my function

 function createlabel() { var newlabelname="news1";  var request = gapi.client.gmail.users.labels.create({  'userid' : 'me', 'labels' : { "labellistvisibility"   : "labelshow", "messagelistvisibility" : "show", "name" : newlabelname, "id" : "news" } }); request.execute(); } 

if use function only, can't works. have authenticate first client id provided google , permissions scopes need code.

ressources :

quickstart gmail js (authentification) : https://developers.google.com/gmail/api/quickstart/js creation label doc : https://developers.google.com/gmail/api/v1/reference/users/labels/create


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -