0
votes

I have a valid oauth2 access_token, that has been authorized with the 'https://apps-apis.google.com/a/feeds/emailsettings/2.0/' scope. I can successfully use this access_token to make requests against other profile api endpoints.

I'm trying to fetch the list of email addresses the account has been verified to send as. I'm using https://apps-apis.google.com/a/feeds/emailsettings/2.0/{domain}/{user}/sendas as the url, and passing the access token in the access_token param. I'm getting an authorization error when attempting this.

Is the emailsettings API supposed to be accessible via oauth2? What am I doing wrong?

2

2 Answers

0
votes

This works as expected for paid Google apps for business accounts. It appears to not work for free Google apps for business accounts setup prior to Dec 2012. When using a free account, the error message when providing the access_token in the Authorization header is "Domain cannot use API."

0
votes

Yes the email setting API is accessible via OAuth 2.0. I suspect that you might not be using an admin account to retrieve other user's sendas. Email Setting API is part of the Admin SDK. If you are using just a regular user account, you will only be able to retrieve your own sendas info