Deprecated: Return type of Slim\Views\Twig::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/htdocs/w01bf09c/www/cuprite/vendor/slim/twig-view/src/Twig.php on line 246

Deprecated: Return type of infrastructure\Timestamp::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/htdocs/w01bf09c/www/cuprite/src/infrastructure/Timestamp.php on line 23
How to Find My Mailchimp List ID and Interest ID with a Mac Now That the API Playground Is Dead | CloutPub

How to Find My Mailchimp List ID and Interest ID with a Mac Now That the API Playground Is Dead

nathanwells

It used to be pretty easy to find a Mailchimp List ID or Interest ID because Mailchimp had created an API Playground that allowed us to explore the API without actually having to write a line of code.

But for whatever reason, Mailchimp has killed the API Playground and so we are left to fend for ourselves.

First you’ll need your API key — if you don’t have one, you can create one by following these instructions: Find My API Key

Once you have an API key you’ll need to take note which Mailchimp server your account is tied to by looking at the suffix on your API key.

Mine is "-us20"

Then you’ll want to open up Terminal by hitting Cmd+Space and typing “Terminal”

Now we’re ready to return all your list IDs. Modify this code to use your own api key and Mailchimp server id (from your API key suffix) and paste it into the terminal and press Enter.

curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists

You’ll get a lot of information back from the API server, so copy and paste the returned data and find the list ID that has an interest category you want to get an ID for and use the list ID (along with your API key and Mailchimp server id):

curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists/YOURLISTID/interest-categories

Then once you have the list ID you can use this code to get a specific interest ID like this:

curl -H "Authorization: apikey YOURAPIKEY" https://us20.api.mailchimp.com/3.0/lists/YOURLISTID/interest-categories/YOURINTERESTCATEGORYID/interests

And that’s it!

Now you can get on to coding bigger and better things!

Like what you read?

ERROR: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated on line 58 in file /www/htdocs/w01bf09c/www/cuprite/vendor/danielstjules/php-pretty-datetime/src/PrettyDateTime.php.