Sign-in Tokens

Create sign-in token

Changed on

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.

post/sign_in_tokens

Request

  • Base URL: https://api.clerk.com/v1
  • URL: https://api.clerk.com/v1/sign_in_tokens
  • Auth: HTTP bearer

Request body

user_idstring required

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

org_idstring nullable

The ID of the organization to activate when the user signs in. Organizations must be enabled for the instance, and the user must be a member of the organization.

expires_in_secondsinteger nullable

Optional parameter to specify the life duration of the sign in token in seconds. By default, the duration is 30 days, or 10 minutes when second_factor_verification is set.

second_factor_verification'fresh' | 'stale' nullable

Optional parameter that lets a user with a second factor enabled complete the sign in without being prompted for it. When omitted, redeeming the token completes only the first factor, and the user must still complete their second factor. fresh: the second factor is treated as verified at sign in. The session token's fva claim reports a second factor age of 0. stale: the second factor is treated as unverified. The session token's fva claim reports the maximum second factor age of 99999, so any reverification that requires a second factor prompts the user to complete one. Has no effect for users without a second factor enabled. A token created with this parameter signs in a user with a second factor enabled without prompting for it, so expires_in_seconds defaults to 10 minutes. We recommend keeping it short.

Response

Success

object'sign_in_token' required
idstring required
status'pending' | 'accepted' | 'revoked' required
user_idstring required
tokenstring
urlstring nullable
created_atinteger required

Unix timestamp of creation.

updated_atinteger required

Unix timestamp of last update.

Changes

  • 2025-11-107db12d6a9b2aRevision changes
    • info

      added the new optional request property

    • info

      the request property default value 2592000 was removed

  • 2025-11-101d47a6af3befRevision changes
    • info

      added the new optional request property

    • info

      added the non-success response with the status