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

Bug: Nexmo SMS no longer works #1680

Open
fvlasie opened this issue Oct 24, 2022 · 2 comments
Open

Bug: Nexmo SMS no longer works #1680

fvlasie opened this issue Oct 24, 2022 · 2 comments
Labels

Comments

@fvlasie
Copy link
Member

fvlasie commented Oct 24, 2022

Describe the Bug

Nexmo has been aqcuired by Vonage and the old code no longer works.

To Reproduce

Try to send a test SMS with Nexmo credentials.

Expected behavior

SMS should be sent.

Actual behavior

SMS is not sent.

Screenshots

No response

Gibbon version

v25

Browser

No response

Browser Version

No response

Additional Context

According to the Vonage API guide:

composer require vonage/client 
$basic  = new \Vonage\Client\Credentials\Basic("457ef234", "SHqUvS3ujQ21wwAAT");
$client = new \Vonage\Client($basic);
$response = $client->sms()->send(
    new \Vonage\SMS\Message\SMS("15413261278", BRAND_NAME, 'A text message sent using the Nexmo SMS API')
);

$message = $response->current();

if ($message->getStatus() == 0) {
    echo "The message was sent successfully\n";
} else {
    echo "The message failed with status: " . $message->getStatus() . "\n";
}

Where "457ef234" and "SHqUvS3ujQ21wwAAT" are the API key and API secret respectively.
And "15413261278" is the receving number.

@fvlasie fvlasie added the bug label Oct 24, 2022
@yookoala
Copy link
Member

yookoala commented Oct 25, 2022

Gibbon is using heavily matthewbdaly/sms-client for SMS sending. The best way to replace this, I think, is to write a Mattewbdaly's Driver implementation for Vonage API to replace it.

The example curl code can be found here or here:

curl -X "POST" "https://rest.nexmo.com/sms/json" \
  -d "from=$VONAGE_BRAND_NAME" \
  -d "text=A text message sent using the Vonage SMS API" \
  -d "to=$TO_NUMBER" \
  -d "api_key=$VONAGE_API_KEY" \
  -d "api_secret=$VONAGE_API_SECRET"

A slight modification of the Nexmo driver should do the job.

@yookoala
Copy link
Member

@fvlasie: I roughly went over the API documentation. It seems there isn't any breaking change to the API. I don't quite understand why the current code would stop working. I tried to invoke the API directly with CURL and your API key and secret. But I got no SMS either. If their documentation is correct, perhaps the problem is elsewhere.

Could there be any issue with your Nexmo / Vonage account? Have you tried contacting their support service (https://www.vonage.com/support/) and ask about it?

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

No branches or pull requests

2 participants