2FA

Enable or disable 2FA

Use this method to enable or disable 2FA for a client after a corresponding wizard for enabling or disabling 2FA has already been initialized. For details on how to enable 2FA with Google Authenticator, refer to [Enable 2FA with Google Authenticator](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#enable-2fa-with-google-authenticator). For details on how to enable 2FA with SMS codes, refer to [Enable 2FA with SMS](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#enable-2fa-with-sms). For details on how to disable 2FA, refer to [Disable 2FA](https://docs.b2core.b2broker.com/en/rest-api-reference-front-2fa.html#disable-2fa).

POST
/api/v2/my/2fa/wizard

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/my/2fa/wizard" \  -H "Content-Type: application/json" \  -d '{}'
{  "code": 202,  "data": {    "phone": "+995500400300",    "confirmation": {      "status": 0,      "entity_id": 1,      "entity_type": "phone",      "recipient": {        "class": "B2B\\TCA\\Confirmations\\Recipients\\PhoneRecipient",        "phone": "+995500400300",        "template": "default",        "type": 1,        "method": "phone"      },      "uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",      "updated_at": "2022-01-01T00:00:00+00:00",      "created_at": "2022-01-01T00:00:00+00:00",      "id": 1,      "sent": 1,      "expired_at": "2022-01-01T00:00:00+00:00",      "sent_at": "2022-01-01T00:00:00+00:00",      "entity": {        "id": 1,        "phone": "+995500400300",        "type": "mobile",        "confirm": true      }    }  },  "done": true,  "uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",  "workflow": "phone"}
{  "error": {    "message": "Bad Request",    "details": [      {        "issue": "The selected value is invalid.",        "field": "parameter"      }    ]  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Service Unavailable"  }}