Tutorial section - RCS
Send RCS with MaaP using Python
Sending RCS with the MaaP API using the Python programming languageThe py-rcs-chatbot
library can be used to make MaaP requests using Python to send RCS.
Python requirements and resources
Python is a programming language and can be used to quickly and easily add RCS support for programmatically sending and receiving RCS messages. Use it for transactional messaging and notifications between your application and mobiles. The following are required to send RCS using Python:
- Python
Python programming language
Requirements and resources
The following are required to send RCS with MaaP using Python:
- py-rcs-chatbot
Python SDK for RCS MaaP chatbot
Install
pip3 install rcs_chatbot
Code
The following example Python code makes a MaaP call to the API_URL
endpoint to send a message in response to a message received from the user. Replace the API_URL
, BOT_ID
and TOKEN
with details from your RCS MaaP provider. Alternatively, use details for the Melrose Labs RCS MaaP Simulator.
The following example Python code starts a HTTP server on port 5000
, waits for a message from a user, and when a message is received sends a message back to the user with the content of their message and two suggestions.
rcs_maap.py
Using in production
Whatever the language or API, you can send RCS and receive RCS between applications and mobiles for a wide range of uses.
We provide a wide range of CPaaS services and infrastructure to organisations, including cloud platforms that enable you to run your own SMS gateway.
Get in contact with us to find out more about CPaaS voice, messaging, video and identity from Melrose Labs.
Testing
For testing your application's RCS support when using the MaaP protocol, we recommend starting with the Melrose Labs RCS MaaP Simulator service to simulate RCS messaging to and from mobiles.
RCS Code BenchGet MaaP credentials for RCS MaaP Simulator
RCS Developer Tools
Alternative APIs and languages
Other languages covered in our tutorials that can be used for sending and receiving RCS with MaaP include: Node.js, cURL