Oauth not working
Closed this issue · 2 comments
I have the latest version of the library 4.0.0 and when I pass datacenter and oauthtoken I get the following error every time.
Title: User action not permitted
Type: http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/
Status: 403
Detail: User does not have access to the requested operation
Errors:
This is how I’m setting up the manager object. I'm 100% sure the datacenter and oauthtoken are correct. Am I suppose to be passing anything else?
MailChimpOptions mailChimpOptions = new MailChimpOptions();
mailChimpOptions.DataCenter = clientLocation.MailChimpDC;
mailChimpOptions.OauthToken = clientLocation.MailChimpAccessToken;
IMailChimpManager mailChimpManager = new MailChimpManager(mailChimpOptions);
Thanks!
For anyone else dealing with the same issue, the api key is simply the access token and data center combined like this...
IMailChimpManager mailChimpManager = new MailChimpManager(access_token + "-" + dc);
This should have been done when provided with mail chimp options. Need to investigate.