Auth

Sign in — second factor (authenticator app)

Step two of a 2FA login by the authenticator app. A matching code also marks a freshly enrolled device as proven. `200` with the session pair (`refresh_token: null` and the `pending_workspace` token for two or more workspaces). Same contract as `POST /api/v1/auth/authenticate-by-authenticator`. Cookie auth (WBL-3265): the tokens are set as the HttpOnly cookies `b2t_access` / `b2t_refresh` and are NOT in the body. Session: the `b2t_access` cookie + `X-B2T-CSRF: 1`.

POST
/api/v2/auth/authenticate-by-authenticator

Authorization

CookieSessionObject
b2t_access<token>

Session JWT in the HttpOnly cookie b2t_access, set by the login endpoints. Mutations also send the header X-B2T-CSRF: 1 (otherwise 403).

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v2/auth/authenticate-by-authenticator" \  -H "Content-Type: application/json" \  -d '{    "auth_code": "123456"  }'
Empty
Empty
{  "message": {    "error": "Your request was made with invalid credentials."  }}
Empty
Empty