Sign-in Tokens

Sign-in tokens are JWTs that can be used to sign in to an application without specifying any credentials. A sign-in token can be used at most once and they can be consumed from the Frontend API using the ticket strategy.

Create sign-in token

Creates a new sign-in token and associates it with the given user. By default, sign-in tokens expire in 30 days. You can optionally supply a different duration in seconds using the expires_in_seconds property.

SecuritybearerAuth
Request
Request Body schema: application/json
user_id
string

The ID of the user that can use the newly created sign in token

expires_in_seconds
integer
Default: 2592000

Optional parameter to specify the life duration of the sign in token in seconds. By default, the duration is 30 days.

Responses
200

Success

404

Resource not found

422

Invalid request parameters

post/sign_in_tokens
Request samples
application/json
{
  • "user_id": "string",
  • "expires_in_seconds": 2592000
}
Response samples
application/json
{
  • "object": "sign_in_token",
  • "id": "string",
  • "status": "pending",
  • "user_id": "string",
  • "token": "string",
  • "url": "string",
  • "created_at": 0,
  • "updated_at": 0
}

Revoke the given sign-in token

Revokes a pending sign-in token

SecuritybearerAuth
Request
path Parameters
sign_in_token_id
required
string

The ID of the sign-in token to be revoked

Responses
200

Success

400

Request was not successful

404

Resource not found

post/sign_in_tokens/{sign_in_token_id}/revoke
Response samples
application/json
{
  • "object": "sign_in_token",
  • "id": "string",
  • "status": "pending",
  • "user_id": "string",
  • "token": "string",
  • "url": "string",
  • "created_at": 0,
  • "updated_at": 0
}