Menu

Expand
Rate this page:

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
sid<YK> Not PII

A 34 character string that uniquely identifies this Access Token.

account_sid
sid<AC> Not PII

The unique SID identifier of the Account.

service_sid
sid<VA> Not PII

The unique SID identifier of the Verify Service.

entity_identity
string Not PII

The unique external identifier for the Entity of the Service.

factor_type
enum:factor_types Not PII

The Type of the Factor. Currently only push is supported.

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
string Not PII

The access token generated for enrollment, this is an encrypted json web token.

url
url Not PII

The URL of this resource.

ttl
integer Not PII

How long, in seconds, the access token is valid. Max: 5 minutes

date_created
date_time<iso8601> Not PII

The date that this access token was created, given in ISO 8601 format.

Create an AccessToken resource

post
https://verify.twilio.com/v2/Services/{ServiceSid}/AccessTokens
Parameters
Parameters in REST API format
service_sid
Path
post sid<VA> Not PII

The unique SID identifier of the Service.

identity
Required
post string PII MTL: 30 DAYS

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
post ienum:factor_types Not PII

The Type of this Factor. Eg. push

factor_friendly_name
Optional
post string PII MTL: 30 DAYS

The friendly name of the factor that is going to be created with this access token

ttl
Optional
post integer Not PII

How long, in seconds, the access token is valid. Can be an integer between 60 and 300. Default is 60.

Example 1
Loading Code Sample...
        
        

        Create Access Token

        Fetch an AccessToken resource

        get
        https://verify.twilio.com/v2/Services/{ServiceSid}/AccessTokens/{Sid}
        Parameters
        Parameters in REST API format
        service_sid
        Path
        get sid<VA> Not PII

        The unique SID identifier of the Service.

        sid
        Path
        get sid<YK> Not PII

        A 34 character string that uniquely identifies this Access Token.

        Example 1
        Loading Code Sample...
              
              

              Fetch Access Token

              Rate this page:

              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.

              Loading Code Sample...
                    
                    
                    

                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    thanks-feedback-gif