Closed segunmicheal27 closed 6 years ago
Hi @segunmicheal27, thanks for reaching out (and sorry for the delay getting back to you)
That error indicates that your machine cannot reach rest.nexmo.com. The endpoint is working fine from my machine. Could you try again to make sure that it wasn't a temporary issue?
If you still can't connect, we can try and work it out together
Cheers, Michael
i think there is issue with guzzle http, i use another curl library to make the request and it went through
let me try it again but i was trying it on my localhost
i am still experiencing same error i am using laravel 5.5 run with phpstorm IDE i am 100% sure that all my credential are all correct
Could you share code and/or explain what you're trying to accomplish so that I can try and replicate the issue?
okay
public function sendSMS($message){
Nexmo::message()->send([
'to' => '2348154967721',
'from' => '2348154967721',
'text' => $message
]);
}
and here is my route
Route::get('/send/sms/{message}', 'UsersController@sendSMS')->name('send_sms');
@segunmicheal27 I just ran this code on Laravel 5.5 (changing to/from to my number) and received the message as expected.
Which versions of the following are you using?
i am using laravel 5.5 "nexmo/client": "^1.1", "nexmo/laravel": "1.0.2"
the Guzzle version that come laravel
i guess Guzzle 6.30
please can you share ur code sample here or paste bin
I've uploaded the project to https://github.com/mheap/nexmo-laravel-test
You'll need to copy .env.example
to .env
and add your Nexmo credentials. You'll also have to change to/from in UsersController
i am getting error Non White-listed Destination - rejected
@segunmicheal27 Are you sending a message your own phone number that you provided to Nexmo to test?
yes
@segunmicheal27 To confirm, have you followed these instructions? https://help.nexmo.com/hc/en-us/articles/204014853-Nexmo-trial-period-How-to-add-numbers-to-list-of-permitted-destinations-
After install the library here is the following i got
cURL error 6: Could not resolve host: rest.nexmo.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
after request