Authentication

Complete a two-factor login

Changed on

Exchanges the mfa_token returned by login for an access token. code is either the 6-digit code from the authenticator app or one of the recovery codes issued at enrollment. The challenge is single-use and expires 5 minutes after login.

Copy as Markdown Open in ChatGPT Open in Claude

post/v1/authentication/mfa/verify

Request

  • Base URL
    https://api.assinafy.com.br
  • URL
    https://api.assinafy.com.br/v1/authentication/mfa/verify
  • Auth
    none required

Request body

mfa_tokenstring required

The token returned by the login response.

codestring required

A 6-digit authenticator code, or a recovery code such as ABCD-EFGH-JKMN.

Example request

{
  "code": "123456"
}

Response

Access token, user and accounts

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "user": {
      "id": "bgjazeo5r9v2lq7l36dx48np",
      "name": "John Smith",
      "email": "example@example.com",
      "telephone": "17989206641",
      "government_id": "15774136604",
      "has_accepted_terms": true,
      "created_at": "2023-03-03T11:51:34Z"
    },
    "accounts": [
      {
        "id": "6401df46d6a6b0c692d9ec49",
        "name": "JS",
        "roles": [
          "owner"
        ],
        "is_delete_allowed": true,
        "created_at": "2023-03-03T11:51:34Z"
      }
    ]
  }
}

Changes