Skip to Content
SeyloDocs
API referenceSign-in and account

Finish signing in with a 2FA code

POST
/api/v1/auth.verifySecondFactor

Exchanges the ticket from a secondFactor LoginResult and a 6-digit authenticator code (or one unused recovery code) for a session. A recovery code is used up.

Needs no sign-in. Not available to MCP clients or the assistant.

Request Body

application/json
  1. body
ticket*string
Length1 <= length <= 200
method*string|string
code*string
Length6 <= length <= 32

Response Body

Success.

application/json
  1. response
viewer*
recoveryCodesLeft*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/api/v1/auth.verifySecondFactor' \  -H 'Content-Type: application/json' \  -d '{  "ticket": "string",  "method": "totp",  "code": "string"}'
Example Response
{  "viewer": {    "id": "string",    "email": "[email protected]",    "name": "string",    "role": "owner"  },  "recoveryCodesLeft": 0}