Access Token Resource
Your client side application uses the AccessToken
resource to authenticate its request to the Verify Push API when creating (i.e., enrolling or registering) an Entity and/or Factor.
While this Verify Push AccessToken
resource is similar to those used by Twilio voice/chat/video products, it cannot be reused between them.
AccessToken properties
Resource Properties in REST API format | |
---|---|
sid
|
A 34 character string that uniquely identifies this Access Token. |
account_sid
|
The unique SID identifier of the Account. |
service_sid
|
The unique SID identifier of the Verify Service. |
entity_identity
|
The unique external identifier for the Entity of the Service. |
factor_type
|
The Type of the Factor. Currently only |
factor_friendly_name
|
A human readable description of this factor, up to 64 characters. For a push factor, this can be the device's name. |
token
|
The access token generated for enrollment, this is an encrypted json web token. |
url
|
The URL of this resource. |
ttl
|
How long, in seconds, the access token is valid. Max: 5 minutes |
date_created
|
The date that this access token was created, given in ISO 8601 format. |
Create an AccessToken resource
https://verify.twilio.com/v2/Services/{ServiceSid}/AccessTokens
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The unique SID identifier of the Service. |
identity
Required
|
The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. |
factor_type
Required
|
The Type of this Factor. Eg. |
factor_friendly_name
Optional
|
The friendly name of the factor that is going to be created with this access token |
ttl
Optional
|
How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60. |
Example 1
Fetch an AccessToken resource
https://verify.twilio.com/v2/Services/{ServiceSid}/AccessTokens/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The unique SID identifier of the Service. |
sid
Path
|
A 34 character string that uniquely identifies this Access Token. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.