Send your First SMS with the Telnyx Python SDK
Video - 7 min read

Send your First SMS with the Telnyx Python SDK

In this guide, messaging engineer Badal Moradia will walk you through sending your first SMS using our Python SDK in just a few minutes:
Step 1: If you haven’t yet, sign up for a free portal account here, otherwise, log into your Mission Control account.
Step 2: In Mission Control, purchase a phone number by navigating to “Numbers” > “Search & Buy Numbers”. Search for a number within the region of your choice. Make sure to check on the SMS feature before hitting search.
Choose the number you’d like, click on “Add to Cart” then go to your cart to purchase.
Step 3: Click on the “Messaging” link on the left navigation, and click on the “Create your first profile” button. Enter a name for the profile and ensure API V2 is selected. Hit save.
Step 4: Go back to the “Numbers” page and associate your phone number with the messaging profile you just created by choosing the profile you just created under the “Messaging Profile” dropdown.
You‘ll be prompted to accept a monthly recurring charge. Click on the “Accept” button.
Your number is now messaging enabled!
Step 5: Click on the “Auth” link on the left navigation, make sure you’re in “Auth V2” then click on the “Create API Key” button.
Note: Make sure to save your API key somewhere safe as this will be the only time you’ll ever get to see it.
Step 6: If you haven’t yet, ensure you have the Telnyx Python SDK already installed. Full documentation can be found here.
Step 7: Copy the “Send SMS” code from the “Sending a Message” page in our Quickstart and paste into your preferred editor.
Step 8: Paste your API key, your messaging-enabled Telnyx number as the “from_” number, the number you’re sending your message to as the “to” number and your message in “text”.
Step 9: Run your python script, and the receiver should be able to receive the message you just sent!
Now that you've set up your outbound capabilities, you might want to check out our full guide to receiving SMS.
Questions about your SMS API set up? We’re here to help! Our support team is available in Mission Control 24/7.
Share on Social

Worth checking out

By using the site, you agree to our use of cookies. Accept and close Find out more here.