I am trying to use the Gmail REST API to mark a message as read.
$('#markGmailRead').click(function(){ var request = $.ajax({ type: 'POST', dataType: 'json', headers: { "Authorization": "Bearer <<ACCESS KEY>>", "Content-Type": "application/json"}, url: 'https://www.googleapis.com/gmail/v1/users/me/messages/<<MESSAGEID>>/modify', data: {"addLabelIds": ["UNREAD"]} }) request.done(function(data){
As a result, the following json is returned:
{ "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "Parse Error" } ], "code": 400, "message": "Parse Error" } }
Has anyone else experienced this? I do not understand what could be causing this.
Steve source share