Create a new enrollment Access Token for the Entity

POST /v2/Services/{ServiceSid}/AccessTokens

TODO: Resource-level docs

Create a new enrollment Access Token for the Entity

Path parameters

  • ServiceSid string Required

    The unique SID identifier of the Service.

Body

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

  • FactorType string Required

    The Type of this Factor. Eg. push

    Value is push.

  • Identity string 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.

  • Ttl integer

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

Responses

  • Created

    Hide response attributes Show response attributes object
    • account_sid string | null

      Account Sid.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • date_created string(date-time) | null

      The date this access token was created

    • entity_identity string | null

      Unique external identifier of the Entity

    • A human readable description of this factor.

    • factor_type string | null

      The Type of the Factor

      Value is push.

    • service_sid string | null

      Verify Service Sid.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^VA[0-9a-fA-F]{32}$.

    • sid string | null

      A string that uniquely identifies this Access Token.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^YK[0-9a-fA-F]{32}$.

    • token string | null

      Generated access token.

    • ttl integer | null

      How long, in seconds, the access token is valid.

    • url string(uri) | null

      The URL of this resource.

POST /v2/Services/{ServiceSid}/AccessTokens
curl \
 -X POST https://verify.twilio.com/v2/Services/{ServiceSid}/AccessTokens \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'FactorFriendlyName=string&FactorType=push&Identity=string&Ttl=42'
Request example
{
  "FactorFriendlyName": "string",
  "FactorType": "push",
  "Identity": "string",
  "Ttl": 42
}
Request examples
{
  "FactorFriendlyName": "string",
  "FactorType": "push",
  "Identity": "string",
  "Ttl": 42
}
Response examples (201)
{
  "account_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "entity_identity": "string",
  "factor_friendly_name": "string",
  "factor_type": "push",
  "service_sid": "string",
  "sid": "string",
  "token": "string",
  "ttl": 42,
  "url": "https://example.com"
}
Response examples (201)
{
  "account_sid": "string",
  "date_created": "2024-05-04T09:42:00+00:00",
  "entity_identity": "string",
  "factor_friendly_name": "string",
  "factor_type": "push",
  "service_sid": "string",
  "sid": "string",
  "token": "string",
  "ttl": 42,
  "url": "https://example.com"
}