Подтверждает email по OTP-коду и привязывает его к текущему пользователю.
Требования:
- требуется JWT
Security
bearerAuth or jwtCookie
- https://felmee.comhttps://felmee.com/api/auth/email/add
- http://localhost:8080http://localhost:8080/api/auth/email/add
curl -i -X PUT \
https://felmee.com/api/auth/email/add \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@example.com",
"otp": "123456"
}'Email успешно привязан
Устаревший 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": "Email successfully added!", "error_code": null, "data": null }