The Twexit API gives you the power to save on your messaging costs by moving your services from Twilio in minutes.
By Tony Furnas
Telnyx is excited to announce our latest product - Twexit API. This new SMS API makes switching from Twilio for your messaging services easier than ever before. Twexit API allows users to send and receive messages through the Telnyx network with ease.
Whether you’re using messaging for two factor authentication, customer support or appointment reminders, you’ll be able to make the switch to Telnyx in minutes by changing just a few lines of your existing Twilio messaging code. Making the switch will give you greater deliverability, cheaper costs and better support today.
Telnyx is ready for you to make the switch, are you ready to Twexit?
Now more than ever it’s vital that businesses manage their costs. Telnyx is designed for that by being 70% cheaper than Twilio for sending messages and texts are completely free to receive. Using the Twexit API will save you money from day one, which, as you can see below, can become incredibly impactful as you scale.
As a true carrier, Telnyx manages a vast catalog of local and toll-free numbers that span the globe. This allows control and configuration of those numbers to be passed to the user via an api-first product.
Twilio relies on third-party providers for phone numbers, limiting your control and adding unnecessary costs.
We understand that things will go wrong and customers will need support. We also believe that you shouldn’t pay more for it. That’s why we provide chat, email, and phone support 24/7 at no additional cost.
Twilio offers a range of support options, but to have the same experience as Telnyx users, customers would have to spend upwards of $18,000 a year.
Telnyx built the Twexit API with ease-of-use in mind. Follow these easy steps to make the switch:
To use the Twexit API, please ensure the following:
Once you have your profile created, select Twexit API under API Version in the Messaging Profile settings.
You should now receive inbound messages and webhooks in Twilio's format.
To find your organization id, run the following curl command:
curl --request GET \
--url https://api.telnyx.com/v2/whoami \
--header 'authorization: ${auth_v2_api_key}'
This endpoint will respond with
{
"data": {
"organization_id": "ORGANIZATION_ID",
"user_id": "USER_ID"
}
}
Fill in the organization id and the auth v2 api key below:
import requests
from requests.auth import HTTPBasicAUth
url = f"https://api.telnyx.com/2010-04-01/Accounts/{organization_id}/Messages.json"
auth = HTTPBasicAuth(organization_id, auth_v2_api_key)
data = {
"From": "+13125550000", # Your Telnyx number
"To": "+13125550001",
"Body": "Hello, World!"
}
response = requests.request('POST', url, auth=auth, data=data)
print(response.text)
The response will contain:
shell script
{
"sid": "40317159-f30d-4940-b751-9a6e81727249",
"date_created": "Wed, 08 Apr 2020 13:20:33 +0000",
"date_updated": "Wed, 08 Apr 2020 13:20:33 +0000",
"date_sent": null,
"account_sid": "${account_id}",
"to": "+13125550000",
"from": "+13125550001",
"messaging_service_sid": "40017155-44c7-4d18-8fa5-332c1a776db5",
"body": "Hello, World!",
"status": "queued",
"num_segments": "1",
"num_media": "0",
"direction": "outbound-api",
"api_version": "2010-04-01",
"price": null,
"price_unit": "USD",
"error_code": null,
"error_message": null,
"uri": "/2010-04-01/Accounts/{organization_id}/Messages/40317159-f30d-4940-b751-9a6e81727249.json",
"subresource_uris": {
"media": "/2010-04-01/Accounts/{organization_id}/Messages/40317159-f30d-4940-b751-9a6e81727249/Media.json"
}
}
Related articles