I am trying to delete the emails from Gmail inbox using Gmail API. During this process i am getting below error.
As per the below error understand that i dont have right privileges to delete emails.
Please advise me on how to grant access in Google Cloud APP to allow Delete function.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden DELETE https://www.googleapis.com/gmail/v1/users/me/messages/188720e09bf038ef { "code" : 403, "details" : [ { "@type" : "type.googleapis.com/google.rpc.ErrorInfo", "reason" : "ACCESS_TOKEN_SCOPE_INSUFFICIENT" } ], "errors" : [ { "domain" : "global", "message" : "Insufficient Permission", "reason" : "insufficientPermissions" } ], "message" : "Request had insufficient authentication scopes.", "status" : "PERMISSION_DENIED" }