Oct 31, 2022 08:41 PM
I am getting a 503 response from Mailchimp API when making a simple GET request.
The same request from Postman works. Any ideas why we get a 503?
Thanks!
Solved! Go to Solution.
Nov 01, 2022 01:26 AM
i’m doing something like this:
let activity = await fetch(`https://${MAILCHIMP_SERVER_PREFIX}.api.mailchimp.com/3.0/lists/${LIST_ID}/members/${allMembers[i].id}/activity?action=unsub,open,click`, {
method: 'GET',
headers: {
"Authorization": `${MAILCHIMP_API_KEY}`
}
});
As I type this out, I’m painfully aware that I’ve missed out the word “Bearer” in my authorization header.
Thanks for your message though! hope this helps someone else out there…
Oct 31, 2022 09:05 PM
Welcome to the community, @June_Lau! :grinning_face_with_big_eyes:
My gut tells me that it’s not actually the exact same request if it works one environment and not in another. Typically the environment changing doesn’t have a dramatic affect on the success or failure of an API call.
Would you mind sharing more details about how you’re attempting to call the API? Actual code from your tests would be most helpful (feel free to replace your API key with something else, of course).
Nov 01, 2022 01:26 AM
i’m doing something like this:
let activity = await fetch(`https://${MAILCHIMP_SERVER_PREFIX}.api.mailchimp.com/3.0/lists/${LIST_ID}/members/${allMembers[i].id}/activity?action=unsub,open,click`, {
method: 'GET',
headers: {
"Authorization": `${MAILCHIMP_API_KEY}`
}
});
As I type this out, I’m painfully aware that I’ve missed out the word “Bearer” in my authorization header.
Thanks for your message though! hope this helps someone else out there…