![]() **WhatsApp outbound OGG is only supported when the ogg file uses the opus audio codec. See the section "WhatsApp Stickers" below for more details. *The image/webp MIME type is only used for WhatsApp stickers, which have additional requirements. MP4 (with H.264 video codec and AAC audio), HEIC The Twilio API for WhatsApp supports sending and receiving the following media formats: Images ![]() For more detail, please see Rules and Best Practices for WhatsApp Messaging on Twilio. Once a user starts a “session” by sending you a message, you can exchange free-form messages with them for 24 hours. Template messages are the initial messages you send to users, and must follow a pre-approved template cleared by WhatsApp. WhatsApp divides outgoing messages into two categories: template messages and session messages. This is because WhatsApp only allows sending media on session messages. This means media files are not allowed in pre-approved templates. If a user has not sent a message to your WhatsApp number within the past 24 hours, you cannot send them a media message through WhatsApp. You can send media messages to any WhatsApp user who has sent you a message within the past 24 hours. Line 6 update with your Account SID and Auth Token.įor full details, including sample code from our Helper Library SDKs, please see Twilio API for WhatsApp (Twilio Docs).Line 5 update with a valid media file url.For more information, see the Rules and Limitations section below. Unprompted messages have template requirements. Note: A free-form message like this is only possible during a 24 hour user-initiated session.Line 4 update with your desired message.Unless your Twilio number has been enabled for WhatsApp in production, use your WhatsApp Sandbox number for sending messages.Line 3 update with a valid WhatsApp sender number.Line 2 update with a valid destination.To make this script work for you, make the following updates, and then paste it into a terminal window: This example will contact the WhatsApp destination (310) 555-5555 from the sender (212) 555-1234 via the WhatsApp app, and includes the image owl.png, and the following message: Thanks for contacting me on WhatsApp! Here is a picture of an owl. u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token' data-urlencode "Body=Thanks for contacting me on WhatsApp! Here is a picture of an owl." \ Here’s an example cURL script: curl -XPOST \ ![]() This is exactly like sending an MMS message with Twilio Programmable SMS. To send a media message with WhatsApp, include the MediaUrl parameter with your HTTP POST request. File name behavior on WhatsApp media messages. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |