-
Notifications
You must be signed in to change notification settings - Fork 34
Error 401 (Unauthorized) when sending a request for adding a new list member #41
Comments
Try |
Doesn't work for me with the same problem. |
I also have same problem |
I'm having the same issue, no matter what I do the request won't be sent with the Authorization header value, if I edit and resend the request with the Auth header added it works.
|
I kept having the same issue, I checked my Key from MailChimp in my account setting. Under KEY, it said my key "was disabled" and under LABEL it said "posted in public, do not enable". Sometimes it's not our code, it's the key itself. Try checking the key you are currently using. |
Any updates? let authenticationString = btoa('user:API_KEY-us20');
|
Hey. Did you try to make your Authorization header look like here? #41 (comment) |
Hey, yeah, but unfortunately it didn't help me. I guess this simple request should work on the Browser console, but not.
|
Ah, you actually should not do this in the browser. I thought it is node code. Making it in the browser exposes you API Key that is not what you want I guess. Instead, you should proxy your request using some backend handler which will, in turn, communicate with the Mailchimp servers using PHP, nodejs or whatever your backend is. In other words, Mailchip just does not allow doing direct requests from the browser. Postman works because it is basically not a browser. |
I had the same issue for a long |
But then I realized it was an issue with mailchimp |
So instead I used Firebase by google |
It worked way better than Mailchimp |
Here is the link: https://firebase.google.com/ |
Hope this helps! |
Here is how I'm trying to send a request:
And I get such error:
POST https://us17.api.mailchimp.com/3.0/lists/185415c92c/members 401 (Unauthorized)
What am I doing wrong?
The text was updated successfully, but these errors were encountered: