# Create credential **POST /v2/Credentials** Credentials for push notifications channels ## Servers - https://chat.twilio.com: https://chat.twilio.com () ## Authentication methods - Account sid auth token ## Parameters ### Body: application/x-www-form-urlencoded (object) - **Type** (string) The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. - **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. ## Responses ### 201 Created #### Headers - **Access-Control-Allow-Origin** (string) Specify the origin(s) allowed to access the resource - **Access-Control-Allow-Methods** (string) Specify the HTTP methods allowed when accessing the resource - **Access-Control-Allow-Headers** (string) Specify the headers allowed when accessing the resource - **Access-Control-Allow-Credentials** (boolean) Indicates whether the browser should include credentials - **Access-Control-Expose-Headers** (string) Headers exposed to the client #### Body: application/json (object) - **sid** (string | null) The unique string that we created to identify the Credential resource. - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential resource. - **friendly_name** (string | null) The string that you assigned to describe the resource. - **type** (string) The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. - **sandbox** (string | null) [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** (string(date-time) | null) The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **date_updated** (string(date-time) | null) The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **url** (string(uri) | null) The absolute URL of the Credential resource. [Powered by Bump.sh](https://bump.sh)