Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect access_key #124

Open
zack1991 opened this issue Oct 12, 2023 · 6 comments
Open

Incorrect access_key #124

zack1991 opened this issue Oct 12, 2023 · 6 comments

Comments

@zack1991
Copy link

const API_KEY = '<Access key created with owner role>';
const messagebird = require('messagebird').initClient(API_KEY);
var params = {
    'originator': 'Test',
    'recipients': [
        '+918875342870'
    ],
    'body': 'Hello, world!'
};

messagebird.messages.create(params, function (err, response) {
    if (err) {
        return console.log(err);
    }
    console.log(response);
});
Error: api error(s): Request not allowed (incorrect access_key) (code: 2, parameter: access_key)
    at IncomingMessage.<anonymous> (D:\work\node-slots-service-v2\node_modules\messagebird\lib\messagebird.js:189:23)
    at IncomingMessage.emit (events.js:388:22)
    at endReadableNT (internal/streams/readable.js:1336:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  statusCode: 401,
  errors: [
    {
      code: 2,
      description: 'Request not allowed (incorrect access_key)',
      parameter: 'access_key'
    }
  ]
}

@wcb-pont
Copy link

@zack1991 are you using access keys created from app.messagebird.com? not api keys from dashboard.messagebird.com? I am currently running into this same issue

@LuckyArdhika
Copy link

@zack1991 are you using access keys created from app.messagebird.com? not api keys from dashboard.messagebird.com? I am currently running into this same issue

this package refer to MCP not MEP. but app.messagebird.com is MCP, so you shouln't use this package

@nirmit1509
Copy link

I'm too facing the same issue. Is there any solution or workaround for this ?

@aodinok
Copy link
Contributor

aodinok commented Apr 30, 2024

Make sure you are using correct access key from dashboard.messagebird.com and not from app.bird.com as stated above. The keys are not interchangeable and work only in correct APIs.
This lib is only for old APIs that are available at dashboard.messagebird.com.

@nirmit1509
Copy link

@aodinok But on trying to sign up on dashboard.messagebird.com, it redirects to api.bird.com

@aodinok
Copy link
Contributor

aodinok commented May 1, 2024

I am afraid that the old platforms is closed for new signups. So this library is only usable for people who have accounts already.

Bird doesn't have yet SDK for new platform published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants