简体   繁体   中英

How to solve ERROR “Delegation denied for <user email>” when i call Gmail API it returns 403 error code in JAVA

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden

`{ "code" : 403, "errors" : [ 
       { "domain" : "global", 
         "message" : "Delegation denied for something@gmail.com", 
         "reason" : "forbidden" } ], 
   "message" : "Delegation denied for something@gmail.com", 
    "status" : "PERMISSION_DENIED" 
    }`

The problem might be that you are trying to send email using an email address that is different than the one specified in the email header. That might be the delegation the error is referring to.

But without the actual code, it is hard to tell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM