Skip to content

Enable two-factor authentication

Verifies the first code from the authenticator app, turns two-factor on and returns the recovery codes. The codes are shown once.

POST/v1/users/me/two-factor
Requires an access token.

Header Parameters

Authorization*string

OAuth 2.0 bearer token.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://auth.ecomiq.pe/v1/users/me/two-factor" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "code": "EJ-001"  }'
{  "recoveryCodes": [    "A1B2-C3D4-E5F6"  ]}