ConversationsCredential

Update Credential

POST
/v1/Credentials/{Sid}

Update an existing push notification credential on your account

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

Sid*string

A 34 character string that uniquely identifies this resource.

Match^CR[0-9a-fA-F]{32}$
Length34 <= length <= 34

Request Body

application/x-www-form-urlencoded

Type?CredentialPushType

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

Value in

  • "apn"
  • "gcm"
  • "fcm"
FriendlyName?string

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

Certificate?string

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

PrivateKey?string

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

Sandbox?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?string

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

Secret?string

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

Response Body

application/json

curl -X POST "https://example.com/v1/Credentials/stringstringstringstringstringstri" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'FriendlyName=Test+slow+create'
{  "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "friendly_name": "Test slow create",  "type": "apn",  "sandbox": "False",  "date_created": "2015-10-07T17:50:01Z",  "date_updated": "2015-10-07T17:50:01Z",  "url": "https://conversations.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}