Class: CredentialInstance

Twilio.Chat.V1.CredentialInstance(version, payload, sid)

new CredentialInstance(version, payload, sid)

Initialize the CredentialContext
Parameters:
Name Type Description
version V1 Version of the resource
payload CredentialPayload The instance payload
sid sid The unique string that identifies the resource
Properties:
Name Type Description
sid string The unique string that identifies the resource
accountSid string The SID of the Account that created the resource
friendlyName string The string that you assigned to describe the resource
type credential.push_service The type of push-notification service the credential is for
sandbox string [APN only] Whether to send the credential to sandbox APNs
dateCreated Date The RFC 2822 date and time in GMT when the resource was created
dateUpdated Date The RFC 2822 date and time in GMT when the resource was last updated
url string The absolute URL of the Credential resource
Source:

Methods

fetch(callbackopt) → {Promise}

fetch a CredentialInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed CredentialInstance
Type
Promise

remove(callbackopt) → {Promise}

remove a CredentialInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed CredentialInstance
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object

update(optsopt, callbackopt) → {Promise}

update a CredentialInstance
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
friendlyName string <optional>
A string to describe the resource
certificate string <optional>
[APN only] The URL encoded representation of the certificate
privateKey string <optional>
[APN only] The URL encoded representation of the private key
sandbox boolean <optional>
[APN only] Whether to send the credential to sandbox APNs
apiKey string <optional>
[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
secret string <optional>
[FCM only] The Server key of your project from Firebase console
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed CredentialInstance
Type
Promise