Hi guys,
I'm trying to let users give my application the ability to view their lists and subscribe emails from my system to the list they specify. My application is an online booking system so it's very useful for my users to be able to add their customers to their mailing lists.
I have read the documentation quite thoroughly but cannot manage to get an access token with which to call the API.
$fields = array(
'grant_type' => 'authorization_code',
'client_id' => MAIL_CHIMP_CLIENT_ID,
'client_secret' => MAIL_CHIMP_CLIENT_SECRET,
'code' => $code,
'redirect_URI' => urlencode(MAIL_CHIMP_REDIRECT_URI)
);
This is supposed to return the access_token.
I'm stumped! Mostly I get gibberish in return. Does anyone have an example of making this call in PHP successfully (or an indication of the correct settings for cURL).
Any help is much appreciated!
James