Create a new enrollment Access Token for the Entity
TODO: Resource-level docs
Create a new enrollment Access Token for the Entity
Path parameters
-
The unique SID identifier of the Service.
Body
-
FactorFriendlyName string
The friendly name of the factor that is going to be created with this access token
-
The Type of this Factor. Eg.
push
Value is
push
. -
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.
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"
}