We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9805bf commit b0f54b1Copy full SHA for b0f54b1
README.md
@@ -74,6 +74,23 @@ if (!empty($response) && isset($response->lists)) {
74
}
75
```
76
77
+### API Key vs OAuth Access Token
78
+
79
+If you need to connect to Mailchimp using an OAuth generated access token modify your calls to use the Mailchimp2 class as follows.
80
81
+```php
82
+<?php
83
+// Replace calls like this:
84
+$api_key = 'YOUR_API_KEY';
85
+$mailchimp = new Mailchimp\Mailchimp($api_key);
86
87
+// With this:
88
+$access_token = 'YOUR_ACCESS_TOKEN';
89
+$data_center = 'YOUR_DATA_CENTER'; // ex. us-10
90
+$mailchimp_lists = new Mailchimp\Mailchimp2($access_token, $data_center);
91
92
+```
93
94
## Testing
95
96
This library includes a [PHPUnit](https://phpunit.de/) test suite.
0 commit comments