APIs
Overview: Connecting to our applications
To connect to Traffic, our messaging solution, to automate message delivery, there are several options: An HTTP REST API that is simpler to implement; or by using the SMPP messaging protocol to allow standardized access, albeit with limited functionality; or using the email gateway interface where you can pass SMS message information as email - this is best suited for lower volumes and situations where you are limited in what alterations you can make to your software. HTTP REST APIFew readersUsing HTTP API version 0.16 (current)
Changes since the previous version (0.15): Simplified message sending by combining all send request methods into one unified method Send. Send method can now be used to send personalized content to each recipient based on a common template. Transliteration parameter added to Send to automatically attempt converting Unicode characters to closest GSM approximations (1-message-content-tranPopularUsage examples: cURL
Here are some example API calls using cURL. These examples use the current API version (0.15), but legacy versions are similar enough that there should only be minor differences for supported commands. cURL --data* parameters automatically set the Content-Type header to the required application/x-www-form-urlencoded so that is omitted from the examples. It could be set with the -H parameter, if necessary. SendOne Sends a sinSome readersReceiving message delivery reports via webhook
You can specify an HTTP(S) address in your account settings for a webhook that will be called from our side whenever a new delivery report comes in for a message sent through your API account. The address you specified for your will receive HTTP POST requests with these parameters: MSSID: SMS ID, receiveFew readersUsing HTTP API version 0.15
Before we start The information we require to activate your account and API access to it is: your server IP address (multiple addresses, wildcard substitution, and subnets are possible.) An HTTP address foSome readers
Other
Using SMS for verification codes
Autofilling verification code from SMS in your website To enable your users' mobile devices to autofill website field with the verification code you sent in your SMS, you should add an autocomplete attribute to the field definition with the value "one-time-code". For example: <input type="text" name="my-otc" id="my-otc" autocomplete="one-time-code"> Link to iOS documentation (https://developer.apple.com/documentation/security/passwordautofill/enablingpasswordautofillonFew readersOur IP addresses
If you need to whitelist our addresses to permit incoming requests (for example, for message delivery reports delivered via webhook,) these are the address ranges we will use for outgoing requests. IPv4 Our AS number is AS15483 and we are using an IPv4 range 159.148.160.0/24 (that is the same as 159.148.160.0 - 159.148.160.254)Few readers