Accounts

Select a two-factor authentication method when changing a trading account password

When a client has more than one two-factor authentication (2FA) method enabled, the wizard for changing a trading account password requires selecting a 2FA method before proceeding. Use this method to select a 2FA method. If a client has a single 2FA method enabled, it is selected automatically during wizard initialization, and this step is not required.

POST
/api/v2/my/accounts/{accountId}/password/2fa

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

accountId*integer

The account identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/my/accounts/1/password/2fa" \  -H "Content-Type: application/json" \  -d '{    "uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",    "type": "sms"  }'
{  "code": 200,  "data": {},  "done": false,  "uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",  "workflow": "2fa_sms_phone_auth"}
{  "error": {    "message": "Bad Request",    "details": [      {        "issue": "The selected value is invalid.",        "field": "parameter"      }    ]  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Forbidden"  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Service Unavailable"  }}