# Send an SMS Message with Python SDK Note: Before you can get started, you need the following already set up: - - [Python](https://www.python.org/) and a familiarity with how to create a new app. - [PIP (package installer for Python)](https://pypi.org/project/pip/) and a familiarity with how to install Python modules. Learn how to quickly send SMS messages in a Python application with the Sinch SMS API. Steps: 1. [Install](#installing-the-sdk) the Python SDK 2. [Set up](#set-up-your-python-application) your Python application 3. [Send](#send-your-first-sms-message) your first SMS message ## Installing the SDK The easiest way to install the SDK is using [`pip`](https://pypi.org/project/pip/): 1. Open a command prompt or terminal to the local repository folder. 2. Execute the following command: ```shell pip install sinch ``` ## Set up your Python application Now you can start setting up your application. ### Create your file Create a new file named `send-sms.py` and paste the provided "Send an SMS message" code into the file. Send an SMS message from sinch import SinchClient sinch_client = SinchClient( key_id="YOUR_key_id", key_secret="YOUR_key_secret", project_id="YOUR_project_id" ) send_batch_response = sinch_client.sms.batches.send( body="Hello from Sinch!", to=["YOUR_to_number"], from_="YOUR_Sinch_number", delivery_report="none" ) print(send_batch_response) br This code initalizes the Sinch Client and then sends a message using the `batches` class. ### Modify your application The code provided includes placeholder parameters. You'll need to update the parameters detailed in the following subsections with your values. #### Initialize the client Before initializing a client using this SDK, you'll need three pieces of information: - Your Project ID - An access key ID - An access key Secret These values can be found on the [Access Keys](https://dashboard.sinch.com/settings/access-keys) page of the Sinch Build Dashboard. You can also [create new access key IDs and Secrets](https://community.sinch.com/t5/Conversation-API/How-to-get-your-access-key-for-Conversation-API/ta-p/8120), if required. Note If you have trouble accessing the above link, ensure that you have gained access to the [Conversation API](https://dashboard.sinch.com/convapi/overview) by accepting the corresponding terms and conditions. #### Fill in remaining parameters Assign your values to the following parameters: | Parameter | Your value | | --- | --- | | `YOUR_Sinch_number` | Any number you've assigned to your Sinch account. Find the number on your Customer [Dashboard](https://dashboard.sinch.com/sms/api/rest) by clicking the service plan ID link and scrolling to the bottom of the page. | | `YOUR_to_number` | The phone number to which you want to send the test SMS message. | Ensure that you save the file. ## Send your first SMS message Now you can execute the code and send your test SMS message. Run the following command: ```shell python send-sms.py ``` ## Next steps The code you used in the `send-sms.py` file uses the Sinch SDK `batches` endpoint to send the SMS message. - Click [here to learn more about the batches endpoint](/docs/sms/sdks/python/syntax-reference/#batches-endpoint-category/). - [Learn how to recieve SMS](/docs/sms/getting-started/python/receive-sms-sdk) ## Additional resources - Visit our [API specification](/docs/sms/api-reference/) to test more endpoints.