メニュー

Expand
ページを評価:

Credential Resource

The Credential resource represents one credential record for a specific push notifications channel. Twilio Conversations supports the APNS, FCM, and GCM push notification channels. Each push notification channel vendor issues its own Credentials, and they can vary between vendors. The Credential resource allows you to save the Credentials that should be used for push notifications to a specific channel.

Credential properties

The Credential resource contains these properties:

Resource Properties in REST API format
sid
sid<CR> Not PII

このリソースを一意に識別する 34 文字の文字列です。

account_sid
sid<AC> Not PII

The unique ID of the Account responsible for this credential.

friendly_name
文字列 PII MTL: 30 DAYS

The human-readable name of this credential, limited to 64 characters. Optional.

type
enum:push_type Not PII

The type of push-notification service the credential is for. Can be: fcm, gcm, or apn.

sandbox
文字列 Not PII

[APN only] Whether to send the credential to sandbox APNs. Can be true to send to sandbox APNs or false to send to production.

date_created
date_time<iso8601> Not PII

このリソースの作成された日付です。

date_updated
date_time<iso8601> Not PII

このリソースが最後に更新された日付です。

url
url Not PII

An absolute API resource URL for this credential.

Create a Credential resource

post
https://conversations.twilio.com/v1/Credentials
パラメーター
Parameters in REST API format
type
必須
post ienum:push_type Not PII

The type of push-notification service the credential is for. Can be: fcm, gcm, or apn.

friendly_name
オプション
post 文字列 PII MTL: 30 DAYS

A descriptive string that you create to describe the new resource. It can be up to 64 characters long.

certificate
オプション
post 文字列 Not PII

[APN only] The URL encoded representation of the certificate. For example, -----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----.

private_key
オプション
post 文字列 Not PII

[APN only] The URL encoded representation of the private key. For example, -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----.

sandbox
オプション
post boolean Not PII

[APN only] Whether to send the credential to sandbox APNs. Can be true to send to sandbox APNs or false to send to production.

api_key
オプション
post 文字列 Not PII

[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.

secret
オプション
post 文字列 Not PII

[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.

例 1
        
        
        
        

        Fetch a Credential resource

        GET
        https://conversations.twilio.com/v1/Credentials/{Sid}
        パラメーター
        Parameters in REST API format
        sid
        Path
        GET sid<CR> Not PII

        このリソースを一意に識別する 34 文字の文字列です。

        例 1
              
              
              
              

              Read multiple Credential resources

              GET
              https://conversations.twilio.com/v1/Credentials
              例 1
                    
                    
                    
                    

                    Update a Credential resource

                    post
                    https://conversations.twilio.com/v1/Credentials/{Sid}
                    パラメーター
                    Parameters in REST API format
                    sid
                    Path
                    post sid<CR> Not PII

                    このリソースを一意に識別する 34 文字の文字列です。

                    type
                    オプション
                    post ienum:push_type Not PII

                    The type of push-notification service the credential is for. Can be: fcm, gcm, or apn.

                    friendly_name
                    オプション
                    post 文字列 PII MTL: 30 DAYS

                    A descriptive string that you create to describe the new resource. It can be up to 64 characters long.

                    certificate
                    オプション
                    post 文字列 Not PII

                    [APN only] The URL encoded representation of the certificate. For example, -----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----.

                    private_key
                    オプション
                    post 文字列 Not PII

                    [APN only] The URL encoded representation of the private key. For example, -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----.

                    sandbox
                    オプション
                    post boolean Not PII

                    [APN only] Whether to send the credential to sandbox APNs. Can be true to send to sandbox APNs or false to send to production.

                    api_key
                    オプション
                    post 文字列 Not PII

                    [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.

                    secret
                    オプション
                    post 文字列 Not PII

                    [FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.

                    例 1
                          
                          
                          
                          

                          Delete a Credential resource

                          削除する
                          https://conversations.twilio.com/v1/Credentials/{Sid}
                          パラメーター
                          Parameters in REST API format
                          sid
                          Path
                          削除する sid<CR> Not PII

                          このリソースを一意に識別する 34 文字の文字列です。

                          例 1
                                
                                
                                
                                
                                ページを評価:

                                ヘルプが必要ですか?

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

                                      
                                      
                                      

                                      フィードバックくださりありがとうございます!

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

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      ステップ1

                                      Get link

                                      Get a free personal referral link here

                                      ステップ2:

                                      Give $10

                                      Your user signs up and upgrade using link

                                      ステップ3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more