Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
A Credential resource represents one credential record for a specific push notifications channel. We support the APNS, FCM, and GCM push notification channels. Each push notification channel vendor issues its own Credentials and they can vary between vendors. This resource allows you to save the Credentials that should be used for push notifications to a specific channel.
You can learn more about provisioning vendor-specific credentials in these topics.
You can also manage the Credentials for Programmable Chat in your Twilio console when you are logged in.
Each Credential resource contains these properties.
sid
type: SID<CR>The unique string that we created to identify the Credential resource.
^CR[0-9a-fA-F]{32}$
34
34
account_sid
type: SID<AC>The SID of the Account that created the Credential resource.
^AC[0-9a-fA-F]{32}$
34
34
type
type: enum<string>The type of push-notification service the credential is for. Can be: gcm
, fcm
, or apn
.
gcm
apn
fcm
sandbox
type: string[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
type: string<date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.
date_updated
type: string<date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.
POST https://chat.twilio.com/v2/Credentials
Type
type: enum<string>RequiredThe type of push-notification service the credential is for. Can be: gcm
, fcm
, or apn
.
gcm
apn
fcm
FriendlyName
type: stringA descriptive string that you create to describe the new resource. It can be up to 64 characters long.
Certificate
type: string[APN only] The URL encoded representation of the certificate. For example,
-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----
PrivateKey
type: string[APN only] The URL encoded representation of the private key. For example,
-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----
Sandbox
type: boolean[APN only] Whether to send the credential to sandbox APNs. Can be true
to send to sandbox APNs or false
to send to production.
ApiKey
type: string[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
Secret
type: string[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.
GET https://chat.twilio.com/v2/Credentials/{Sid}
Sid
type: SID<CR>The SID of the Credential resource to fetch.
^CR[0-9a-fA-F]{32}$
34
34
GET https://chat.twilio.com/v2/Credentials
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://chat.twilio.com/v2/Credentials/{Sid}
Sid
type: SID<CR>The SID of the Credential resource to update.
^CR[0-9a-fA-F]{32}$
34
34
FriendlyName
type: stringA descriptive string that you create to describe the resource. It can be up to 64 characters long.
Certificate
type: string[APN only] The URL encoded representation of the certificate. For example,
-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----
PrivateKey
type: string[APN only] The URL encoded representation of the private key. For example,
-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----
Sandbox
type: boolean[APN only] Whether to send the credential to sandbox APNs. Can be true
to send to sandbox APNs or false
to send to production.
ApiKey
type: string[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
Secret
type: string[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.
DELETE https://chat.twilio.com/v2/Credentials/{Sid}
Sid
type: SID<CR>The SID of the Credential resource to delete.
^CR[0-9a-fA-F]{32}$
34
34