Vonage (Nexmo) for SMS Notifications
General Bytes offers the Nexmo (now Vonage) API to send SMS codes to your customers. The charges per SMS varies across regions. They typically run less than a single US cent per message.
NOTE: The major phone carriers around the globe impose limits upon the frequency of SMS transmission. They do this to prevent SMS spam & to provide a consistent service. The carriers use equipment that has limitations; there’s no getting around this. When these limits are exceeded, the carrier will “filter” out the excess SMS traffic, and those messages will simply be discarded: lost. You’ll commonly see these filtering events occur in batches.
Create your Nexmo account.
Free trial: https://ui.idp.vonage.com/ui/auth/registration
NOTE: the free trial will only work for testing the CAS API. This detail is not currently posted on their website or mentioned in their guides. You cannot use it for live SMS messaging (only for testing).
The The “free trial” number they provide may not work (for testing) for the first few days. Try sending a test from the Nexmo dashboard - if it works, then the CAS API test should also work.
You will have to add funds to:
procure a toll-free number, or
register a brand and campaign to send messages in the USA.
Either method will work, but each has it’s hurdles:
See: 10DLC (below)
An alternative for testing messages in the USA (that does not require immediate 10DLC registration) is purchasing and using a toll-free number (i.e., https://dashboard.nexmo.com/buy-numbers). However, the toll-free number will also get blocked after sending multiple messages in a short period of time. Eventually, a toll-free number also needs to be verified to prevent blockage.
Enter your details, verify your access to SMS + email.
No, not a developer.
Role: Operations
Select SMS
Due to new spam regulations imposed around the globe, carriers restrict SMS messages to “approved” use-cases. Vonage/Nexmo requires you to specify your use-case:
https://api.support.vonage.com/hc/en-us/articles/204017023-USA-SMS-Features-Restrictions
Cryptocurrency spam is forbidden:
do not use your Vonage account to send cryptocurrency ads or offers. Your Vonage account will be closed.
The use case of CAS is identity verification and notification (only).
Usage outside that case will likely trigger your account closure.
Navigate to your Nexmo dashboard
Locate and copy/save your API key and API secret:
Locate your working “from” phone number:
https://dashboard.nexmo.com/your-numbers
Copy the registered number you’ll use to represent you (the “from” number) in SMS messages.
The number must include the country code (“+1” in this example).
Navigate to your Organization settings
Scroll down to “SMS Provider”.
Select Nexmo.
Enter your credentials as a single-line string with no spaces:
api_key:api_secret:from_phone
Example parameter string: 2f8a4afc:s3cr3t:+15555212855
Save the new settings!
Return and test.
If the green “successful” notification appears, then you’ve entered the parameters successfully.
Problems?
The Vonage/Nexmo API won’t work with the “free trial” phone number. You’ll have to either procure a toll-free number, or setup your 10DLC campaign. The CAS tests may pass, but no messages will get through if Vonage/Nexmo has not approved your “from” number for the allowed/approved purposes.
If you abuse your privileges with the number given to you by Vonage, they may block your number. The SMS tests will pass (in CAS) but the messages will not get through.
Contact Vonage: https://api.support.vonage.com/hc/en-us/requests/new
Copyright © 2020-2024 General Bytes USA LLC