diff --git a/examples/mailchimp.php b/examples/mailchimp.php index dd7e12bd..8c2a61be 100644 --- a/examples/mailchimp.php +++ b/examples/mailchimp.php @@ -41,7 +41,7 @@ $token = $mailchimpService->requestAccessToken($_GET['code']); // Send a request with it - $result = $mailchimpService->request('/users/profile.json'); + $result = $mailchimpService->request('/'); header('Content-Type: application/json'); echo $result; exit; diff --git a/src/OAuth/OAuth2/Service/Mailchimp.php b/src/OAuth/OAuth2/Service/Mailchimp.php index 842153de..98d63547 100644 --- a/src/OAuth/OAuth2/Service/Mailchimp.php +++ b/src/OAuth/OAuth2/Service/Mailchimp.php @@ -106,7 +106,7 @@ protected function setBaseApiUri(StdOAuth2Token $token) $meta = json_decode($response, true); // Set base api uri. - $this->baseApiUri = new Uri('https://'. $meta['dc'] .'.api.mailchimp.com/2.0/'); + $this->baseApiUri = new Uri('https://'. $meta['dc'] .'.api.mailchimp.com/3.0/'); // Allow chaining. return $this;