![]() Sending messages globally at-scale can be complex, but Twilio wants to help make it as easy as possible. Learn more about scaling your messaging with Messaging Services If you wish, you can also pass a specific From number anytime you want to bypass the automatic number selection that would otherwise be applied by your Messaging Service.įor full details, see Sending messages with a Messaging Service. In general, short codes will be prioritized first (if one is present and able to reach the destination), followed by Alpha Sender ID (if present), then local numbers, and finally non-local numbers. When you pass the Messaging Service SID instead of a specific From number, Twilio will automatically select the best sender in your Messaging Service sender pool for reaching the To number you're sending to. You can either pass the Messaging Service SID in your From parameter, or you can use its SID as the MessagingServiceSid parameter in your API request. The Messaging Service SID starts with "MG" and can be found in the Properties page for the Messaging Service in Console. There is only one small code change needed to begin sending messages using your Messaging Service: instead of specifying a From number in your API request, you specify a Messaging Service SID. Step 4: Start passing your Messaging Service SID in your API requests to send messages You can also add senders programmatically via the Phone Numbers, Short Codes, and Alpha Sender IDs subresources on the Messaging Services API. In Console, navigate to the "Sender Pool" page for your Messaging Service and click the button to add one or more Twilio senders, such as phone numbers, to the pool. Your Messaging Service can contain Twilio phone numbers, short codes, WhatsApp senders, and even an Alphanumeric Sender ID. Step 3: Add senders to your Messaging Service You can also modify your inbound message handling settings via the Messaging Services API. update the webhook) for an existing Messaging Service, visit the Messaging Services page, click the Messaging Service you want to configure, then click "Integration" in the left-hand navigation area. To change the inbound message handling behavior (e.g. If you want to set a webhook for the entire Messaging Service, you can specify this during creation. When an incoming message arrives at one of your Twilio numbers in a Messaging Service, the Service can either refer to your phone number for how to handle inbound messages, or it can have their own incoming message handling setting that is shared across all numbers in the Messaging Service.īy default, Twilio will set your Messaging Service to "Defer to sender's webhook," meaning inbound messages will hit whatever inbound message handler is configured on your individual phone numbers. Step 2: Set up inbound message handling (if desired) ![]() You can also create a Messaging Service via the Messaging Services API. In Console, visit the Messaging Services page and click the button to create a Messaging Service, then follow the prompts. Learn more about scaling your messaging with Messaging Services.Step 4: Start passing your Messaging Service SID in your API requests to send messages. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |