update_auth_params
To change two-factor authentication settings, use the user/update_auth_params method.
svc=user/update_auth_params¶ms={
"userId": <long>,
"type": <int>,
"phone": <text>
}
Parameters
The required parameters are marked with an asterisk (*).
| Name | Description |
|---|---|
| userId* | User ID. |
| type* | Type (0 for none, 1 for email, 2 for SMS). |
| phone | Phone number. Required if type is 2. |
Response
If the request is completed successfully, a response of the following format is returned:
{
"type": <uint>,
"phone": <text>
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Failed to set new authentication parameters. |
| 7 | The user isn’t found or you have no access to this user, or type is 2 and phone isn’t specified. |