2

I want to make sure before making payment on Nexmo if it possible to send S.M.S to my users on my database using laravel and Nexmo. Because i try doing that and what i got is a Non White-listed Destination - rejected error. or do i have to add all my phone numbers to nexmo database before i can use them or it is because am using the trial version. code for sending message that gives the Non white-listed Error

$nexmo = app('Nexmo\Client');
        $nexmo->message()->send([
        'to' => \Auth::user()->phone,
        'from' => config('app.name', 'Laravel'),
        'text' => 'Text message Sent From '.config('app.name', 'Laravel').' To confrim that this is your Phone Number.'
        ]);
dagogodboss
  • 483
  • 1
  • 4
  • 19

2 Answers2

2

When initially subscribing to Nexmo, you are able to use it on up to 10 destination numbers in a demo mode until you top up your acount. To send messages to these phone numbers, you need to add them in https://dashboard.nexmo.com/.

Alex Blex
  • 34,704
  • 7
  • 48
  • 75
  • is there programmatic way to run that. ie adding the numbers to nexmo.dashboard – dagogodboss Mar 13 '17 at 12:53
  • I doubt so, why would you need it? It is quicker to add it manually rather than write any program to do that. – Alex Blex Mar 13 '17 at 13:17
  • @AlexBlex If a user registers and you want to send them an sms message, it would be nice not to have to manually add their number to a white list. Does nexmo not include an api that would allow this functionality? – whitwhoa May 12 '17 at 21:18
  • 1
    No. The whitelist is for testing purposes in the free demo mode. Paid clients do not have this limitation and can use it in production for any numbers. – Alex Blex May 12 '17 at 21:27
  • I am facing issue after whitelisting test number unable to send SMS.getting error: status: '29', 'error-text': 'Non White-listed Destination - rejected' – Manish Joshi Mar 15 '20 at 02:39
-2

Your phone need to add international telephone area code before your phone Example: 84["phone number"] => 843555555...