Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Variable

Variables are key/value pairs that you can add to a specific Environment. Use these for storing configuration like API keys rather than hardcoding them into your Functions.

Variable properties

Names in PHP format
sid
sid<ZV> Not PII

The unique SID identifier of this Variable.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account that owns this Variable.

serviceSid
sid<ZS> Not PII

The unique SID identifier of the Service for this Variable.

environmentSid
sid<ZE> Not PII

The unique SID identifier of the Environment in which this Variable exists.

key
文字列 PII MTL: 7 DAYS

A string by which this Variable can be referenced, fewer than 128 characters.

value
文字列 PII MTL: 7 DAYS

A string that contains the actual value of this Variable, less than 450 bytes.

dateCreated
date_time<iso8601> Not PII

The date that this Variable was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Variable was updated, given in ISO 8601 format.

url
url Not PII

The URL of this Variable.

Create a Variable resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables
パラメーター
Names in None format
service_sid
必須
post sid_like<ZS> Not PII

The unique SID identifier of the Service for this Variable.

environment_sid
必須
post sid<ZE> Not PII

The unique SID identifier of the Environment in which this Variable exists.

key
必須
post 文字列 PII MTL: 7 DAYS

A string by which this Variable can be referenced, fewer than 128 characters. Required.

value
必須
post 文字列 PII MTL: 7 DAYS

A string that contains the actual value of this Variable, less than 450 bytes. Required.

        
        
        
        

        Fetch a Variable resource

        GET
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}
        パラメーター
        Names in None format
        service_sid
        必須
        GET sid_like<ZS> Not PII

        The unique SID identifier of the Service for this Variable.

        environment_sid
        必須
        GET sid<ZE> Not PII

        The unique SID identifier of the Environment in which this Variable exists.

        sid
        必須
        GET sid<ZV> Not PII

        The unique SID identifier of this Variable.

              
              
              
              

              Read multiple Variable resources

              GET
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables
              パラメーター
              Names in None format
              service_sid
              必須
              GET sid_like<ZS> Not PII

              The unique SID identifier of the Service for these Variables.

              environment_sid
              必須
              GET sid<ZE> Not PII

              The unique SID identifier of the Environment in which these Variables exist.

                    
                    
                    
                    

                    Update a Variable resource

                    post
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}
                    パラメーター
                    Names in None format
                    service_sid
                    必須
                    post sid_like<ZS> Not PII

                    The unique SID identifier of the Service for this Variable.

                    environment_sid
                    必須
                    post sid<ZE> Not PII

                    The unique SID identifier of the Environment in which this Variable exists.

                    sid
                    必須
                    post sid<ZV> Not PII

                    The unique SID identifier of this Variable.

                    key
                    オプション
                    post 文字列 PII MTL: 7 DAYS

                    A string by which this Variable can be referenced, fewer than 128 characters. Optional.

                    value
                    オプション
                    post 文字列 PII MTL: 7 DAYS

                    A string that contains the actual value of this Variable, less than 450 bytes. Optional.

                          
                          
                          
                          

                          Delete a Variable resource

                          削除する
                          https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}
                          パラメーター
                          Names in None format
                          service_sid
                          必須
                          削除する sid_like<ZS> Not PII

                          The unique SID identifier of the Service for this Variable.

                          environment_sid
                          必須
                          削除する sid<ZE> Not PII

                          The unique SID identifier of the Environment in which this Variable exists.

                          sid
                          必須
                          削除する sid<ZV> Not PII

                          The unique SID identifier of this Variable.

                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

                                誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。