Take the 2-minute tour ×

I am trying to retrieve labels with GoogleMailSettingsService through C# code but I am getting a 403 Forbidden error. I am using a Admin username / password, the "Use provisioning API" option is checked, and we have a business account.

GoogleMailSettingsService service = new GoogleMailSettingsService(domain, app_name);
service.setUserCredentials(user_name, password);
AppsExtendedFeed labels = service.RetrieveLabels(user_name);

Can anyone please let me know what is wrong?

share|improve this question

1 Answer 1

I want to post this as a comment instead of an answer. From the documentation Google provided, it looks like when a 403 error is received, it is possible that the account you are using is not an administrator. https://developers.google.com/google-apps/help/articles/provisioningoauth

Would you try to run it with a super admin account instead and see if the problem still persisted?

share|improve this answer

Your Answer


