Update an existing push notification credential on your account
A Credential resource represents a push notification credential.
Update an existing push notification credential on your account
Path parameters
-
A 34 character string that uniquely identifies this resource.
Body
-
ApiKey string
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
-
Certificate string
[APN only] The URL encoded representation of the certificate. For example,
-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----
. -
FriendlyName string
A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
-
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 orfalse
to send to production. -
Secret string
[FCM only] The Server key of your project from the Firebase console, found under Settings / Cloud messaging.
-
Type string
The type of push-notification service the credential is for. Can be:
fcm
,gcm
, orapn
.Values are
apn
,gcm
, orfcm
.
curl \
-X POST https://conversations.twilio.com/v1/Credentials/{Sid} \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'ApiKey=string&Certificate=string&FriendlyName=string&PrivateKey=string&Sandbox=true&Secret=string&Type=apn'
{
"ApiKey": "string",
"Certificate": "string",
"FriendlyName": "string",
"PrivateKey": "string",
"Sandbox": true,
"Secret": "string",
"Type": "apn"
}
{
"ApiKey": "string",
"Certificate": "string",
"FriendlyName": "string",
"PrivateKey": "string",
"Sandbox": true,
"Secret": "string",
"Type": "apn"
}
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"friendly_name": "string",
"sandbox": "string",
"sid": "string",
"type": "apn",
"url": "https://example.com"
}
{
"account_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"friendly_name": "string",
"sandbox": "string",
"sid": "string",
"type": "apn",
"url": "https://example.com"
}