Подтверждает новый номер телефона по OTP-коду и изменяет его у текущего пользователя.
Требования:
- требуется JWT
- новый номер не должен быть уже зарегистрирован
Security
bearerAuth or jwtCookie
- https://felmee.comhttps://felmee.com/api/auth/phone/edit
- http://localhost:8080http://localhost:8080/api/auth/phone/edit
curl -i -X POST \
https://felmee.com/api/auth/phone/edit \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"phone": "+79991234567",
"otp": "123456"
}'Телефон успешно изменён
Устаревший camelCase-alias поля error_code; при ошибке оба поля содержат одинаковое значение.
Код ошибки. Для успешных ответов всегда null.
Enum:"invalid_body""unauthorized""not_found""conflict""object_modified_by_another_thread""action_too_late""too_many_request""code_is_gone""forbidden""user_blocked"
Example:null
Response
{ "success": true, "message": "Phone successfully changed!", "error_code": null, "data": null }