How to format an API call to Mailchimp

XLbyname

New Member
Joined
Nov 18, 2021
Messages
11
Office Version
  1. 2010
Platform
  1. Windows
Hi All,

I am building something in Excel to draw in data from Mailchimp, but I'm learning about APIs from scratch.

Just to dip my toe in the water I am trying to make my first API call, a simple ping. I just want to do this from a browser and see the response "Everything's Chimpy!"

https://[SERVER-LOCATION].api.mailchimp.com/3.0/ping

If I pop that in a browser - replacing [SERVER-LOCATION] with us4 I get:

{"type":"Errors Documentation | Mailchimp Developer","title":"API Key Invalid","status":401,"detail":"Your request did not include an API key.","instance":"8cc77e58-464f-ce8c-b852-c3aeef6a1183"}

So let's say my API key is "ABC123-us4" how can I amend what I put in the browser so it returns a successful ping? Ideal answers in simple URL form as below avoiding [generic square bracketed things]. Just use the ABC123-us4 exactly as it is. No VBA code at this stage, just a single URL.

I went for this and it didn't work:
Thanks so much for your help.

Tom
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The query string part of the URL starts with a question mark and parameters are separated by an ampersand. Therefore try:

Thanks very much. That's what I figured it would be but no dice. Either the API key is wrong or we're not quite there yet. But many thanks for your help.

Response:
{"type":"Errors Documentation | Mailchimp Developer","title":"API Key Invalid","status":401,"detail":"Your request did not include an API key.","instance":"a1a6ca68-4175-a4a4-0bad-4e7bc39f1946"}
 
Upvote 0
The error message and documentation tells you what the problem is:
API Key Invalid The API key is either invalid or disabled; there will be more information in the “detail”.
If the API key is valid, have you checked to make sure that you've enabled it for authentication?
 
Upvote 0
The error message and documentation tells you what the problem is:

If the API key is valid, have you checked to make sure that you've enabled it for authentication?
Ooooh. No - tell me more!
 
Upvote 0
Ooooh. No - tell me more!
Im not sure what more there is to say. I've just quoted the error documentation you linked to in your post. Error number 401 (as per the error message). It links to a guide on authenticating via the marketing API, so...
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top