0

I am using this method Create delegate to try and add a delegate to a user's email account. I am getting a "Forbidden" error message when trying to give a regular user delegate access to another regular user's email account.

user = "regular user email here"
body = {
    "delegateEmail": "other regular user here",
    "verificationStatus": "accepted"
}

gmailService = build('gmail', 'v1', credentials=creds)
response = gmailService.users().settings().delegates().create(userId=user, body=body).execute()
print(response)

Error:

"Delegation denied for <my Google account>". Details: "[{'message': 'Delegation denied for <my Google account>', 'domain': 'global', 'reason': 'forbidden'}]">

0 Answers0