Skip to content

Incorrect access_key #124

@zack1991

Description

@zack1991
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'
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions