-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
In MailChimpAPI_v2_0.js the constructor takes an apiKey which is split and then uses as the datacenter prefix for .api.mailchimp.com. If I have already negotiated an oauth token externally to your library, currently need to fudge the API key so the datacenter is correctly derived from the user profile, and then force the actual auth token attribute
My current workflow is something like this :
getAPI = function(sysImports) {
var api = new MailChimpAPI(
' -' + JSON.parse(sysImports.auth.oauth.profile).dc,
{
version : '2.0'
}
);
api.apiKey = sysImports.auth.oauth.token;
return api;
}
... to get the right dc.
Is there a better way to use prenegotiated oauth profile and token or can I please otherwise request that datacenter be part of MailChimpAPI_v2_0 constructor options
Metadata
Metadata
Assignees
Labels
No labels