I just started getting the error on 8/19/2015: Execution of request failed: https://apps-apis.google.com/a/feeds/emailsettings/2.0/myDomain/myUser/imap
The program has been running fine before 8/19. The users are all new users and it fails on most of them, but a few do work. I tried on a couple of accounts that have been around a while and it worked. I double checked that the "Disable POP and IMAP access for all users." is not checked. I am not sure what to do. The error happens on the RetrieveImap(userID).
OAuth2Parameters oA2Parm;
if (gCredential.RequestAccessTokenAsync(System.Threading.CancellationToken.None).Result) {
oA2Parm = new OAuth2Parameters() {
AccessToken = gCredential.Token.AccessToken
};
} else {
eMsgImap = @"Error. setIMapTrue: can't get Access Token.";
return eMsgImap;
}
GoogleMailSettingsService gEmailSettingService;
AppsExtendedEntry ee;
GOAuth2RequestFactory rf = new GOAuth2RequestFactory("apps", "gMail APIs", oA2Parm);
gEmailSettingService = new GoogleMailSettingsService(gDomain, "gMail API");
while ....
ee = gEmailSettingService.RetrieveImap(userID);