Reputation: 21
I am trying to send message on the mobile number using Messagebird
but getting the following error:
statusCode: 422,
errors: [
{
code: 9,
description: 'no (correct) recipients found. Note: during your test period you can only send messages
to your own number (+).',
parameter: 'recipient'
}
]
The code is given below:
const messagebird = require('messagebird').initClient('2nAHkmfpX6kmgduCTz4cKDobe');
const originator = "SMSAPI";
const recipient = "+91XXXXXXXXXX";
const params = {
originator: originator,
recipients: [recipient],
body: 'Hello, this is a test message from MessageBird!'
};
messagebird.messages.create(params, function (err, response) {
if (err) {
console.error(err);
} else {
console.log(response);
}
});
Upvotes: 1
Views: 172