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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -