Short Codes für Nachrichten
Ein Short Code ist eine 5- oder 6-stellige Nummer, über die Nachrichten mit Mobiltelefonen versendet und empfangen werden können. Diese durchsatzstarken Nummern sind perfekt für Apps, die Nachrichten an viele Anwendenden oder zeitkritische Nachrichten versenden müssen. Sie können Short Codes von Twilio kaufen oder vorhandene Kurzwahlnummern auf unsere Plattform portieren.
Informationen zum Senden von Nachrichten über den Short Code finden Sie in der Dokumentation zu Nachrichten senden.
ShortCode properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created this ShortCode resource. |
api_version
|
The API version used to start a new TwiML session when an SMS message is sent to this short code. |
date_created
|
The date and time in GMT that this resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT that this resource was last updated, specified in RFC 2822 format. |
friendly_name
|
A string that you assigned to describe this resource. By default, the |
short_code
|
The short code. e.g., 894546. |
sid
|
The unique string that that we created to identify this ShortCode resource. |
sms_fallback_method
|
The HTTP method we use to call the |
sms_fallback_url
|
The URL that we call if an error occurs while retrieving or executing the TwiML from |
sms_method
|
The HTTP method we use to call the |
sms_url
|
The URL we call when receiving an incoming SMS message to this short code. |
uri
|
The URI of this resource, relative to |
Fetch a ShortCode resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the ShortCode resource(s) to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the ShortCode resource to fetch |
Example 1
Read multiple ShortCode resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json
Gibt eine Liste von ShortCode-Ressourcen zurück, die jeweils einen Short Code in Ihrem Konto repräsentieren. Diese Liste enthält Paging-Informationen.
Filtern Sie die von Twilio zurückgegebene Liste
Mit den folgenden Query-String-Parametern können Sie die zurückgegebene Liste einschränken.
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the ShortCode resource(s) to read. |
friendly_name
Optional
|
The string that identifies the ShortCode resources to read. |
short_code
Optional
|
Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. |
Example 1
Example 2
Example 3
Update a ShortCode resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
Versucht, die Eigenschaften vom Short Code zu aktualisieren. Dieser API-Aufruf gibt im Erfolgsfall die aktualisierte Ressourcendarstellung zurück. Die zurückgegebene Antwort ist identisch mit der, die bei einer GET-Anfrage zurückgegeben wird.
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the ShortCode resource(s) to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the ShortCode resource to update |
friendly_name
Optional
|
A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the |
api_version
Optional
|
The API version to use to start a new TwiML session. Can be: |
sms_url
Optional
|
The URL we should call when receiving an incoming SMS message to this short code. |
sms_method
Optional
|
The HTTP method we should use when calling the |
sms_fallback_url
Optional
|
The URL that we should call if an error occurs while retrieving or executing the TwiML from |
sms_fallback_method
Optional
|
The HTTP method that we should use to call the |
Example 1
Benötigen Sie Hilfe?
Das passiert uns allen manchmal; Code ist schwer. Erhalten Sie jetzt Hilfe von unserem Support‑Team, vertrauen Sie auf das Wissen der Community im Stack Overflow Collective von Twilio oder suchen Sie auf Stack Overflow nach dem Twilio‑Tag.