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.
The Credential resource contains these properties:
A 34 character string that uniquely identifies this resource.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique ID of the Account responsible for this credential.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The human-readable name of this credential, limited to 64 characters. Optional.
The type of push-notification service the credential is for. Can be: fcm
, gcm
, or apn
.
apn
gcm
fcm
[APN only] Whether to send the credential to sandbox APNs. Can be true
to send to sandbox APNs or false
to send to production.
An absolute API resource URL for this credential.
POST https://conversations.twilio.com/v1/Credentials
application/x-www-form-urlencoded
The type of push-notification service the credential is for. Can be: fcm
, gcm
, or apn
.
apn
gcm
fcm
A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
[APN only] The URL encoded representation of the certificate. For example,
-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----
.
[APN only] The URL encoded representation of the private key. For example,
-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----
.
[APN only] Whether to send the credential to sandbox APNs. Can be true
to send to sandbox APNs or false
to send to production.
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.
GET https://conversations.twilio.com/v1/Credentials/{Sid}
A 34 character string that uniquely identifies this resource.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
GET https://conversations.twilio.com/v1/Credentials
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
POST https://conversations.twilio.com/v1/Credentials/{Sid}
A 34 character string that uniquely identifies this resource.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
The type of push-notification service the credential is for. Can be: fcm
, gcm
, or apn
.
apn
gcm
fcm
A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
[APN only] The URL encoded representation of the certificate. For example,
-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----
.
[APN only] The URL encoded representation of the private key. For example,
-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----
.
[APN only] Whether to send the credential to sandbox APNs. Can be true
to send to sandbox APNs or false
to send to production.
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.
DELETE https://conversations.twilio.com/v1/Credentials/{Sid}
A 34 character string that uniquely identifies this resource.
^CR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34