thorning / node-mailchimp

node mailchimp wrapper using v3 of the mailchimp api
MIT License
288 stars 35 forks source link

Api v3 error #26

Closed iLeonelPerea closed 7 years ago

iLeonelPerea commented 7 years ago

Hi everyone.

I am doing a POST, trying to add a member to a List but shows the following error:

{"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"API Key Missing","status":401,"detail":"Your request did not include an API key.","instance":""}

do you know what happend?

Tnks

thorning commented 7 years ago

did you follow the example? specifically initializing the module with an api key?

var Mailchimp = require('mailchimp-api-v3')

var mailchimp = new Mailchimp(api_key);

In any case, since the error tells you there are no API key, you need to include that part in the issue, to give readers a chance :)

iLeonelPerea commented 7 years ago

I am running your module in my own react code.

I am running your example code in the terminal and it works. But when I run it from the browser it doesn't work.

Do you think that the web browser changes the way that does the request? Any idea?

thorning commented 7 years ago

How do you handle the dependencies? This module uses request to send the actual requests to mailchimp, and sets the api-key via an auth option.

iLeonelPerea commented 7 years ago

I am using yarn..

Also I tried different modules.

works only from the terminal. but if i run from the webbbrowser it does work

On Tue, May 2, 2017 at 11:04 AM, Andreas Thorning notifications@github.com wrote:

How do you handle the dependencies? This module uses request to send the actual requests to mailchimp, and sets the api-key via an auth option.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thorning/node-mailchimp/issues/26#issuecomment-298680655, or mute the thread https://github.com/notifications/unsubscribe-auth/AC1MNJiGJSgVuhtUOTL0Fo2WWgQYkGAsks5r11QNgaJpZM4NNOrV .

thorning commented 7 years ago

I added a issue for browser side support, and closing the related tasks