I was going through the api doc for setting forwarding address via gmail Apis https://developers.google.com/gmail/api/reference/rest/v1/users.settings.forwardingAddresses/create
I am getting the following error when trying to access this api.
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Access restricted to service accounts that have been delegated domain-wide authority",
"reason" : "forbidden"
} ],
"message" : "Access restricted to service accounts that have been delegated domain-wide authority",
"status" : "PERMISSION_DENIED"
}
If there is a way to access this api? Few other doubts I have:
- Can this be used for any personal @gmail.com accounts?
- Can this be also used for any gsuite domains like @example.com?