Регистрация: шаг 2 — подтверждение телефона
POST
/v1/auth/verify-phone
const url = 'https://api.rekassa.uz/v1/auth/verify-phone';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"challengeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","code":"123456"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.rekassa.uz/v1/auth/verify-phone \ --header 'Content-Type: application/json' \ --data '{ "challengeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "code": "123456" }'Проверяет SMS-код, активирует аккаунт с ролью «Пользователь» и выполняет вход.
Parameters
Заголовок раздела « Parameters »Header Parameters
Заголовок раздела «Header Parameters»X-Client
string
web for browser clients
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
object
challengeId
required
string format: uuid
code
required
string
Example
123456Responses
Заголовок раздела « Responses »Media typeapplication/json
object
accessToken
required
string
accessTokenExpiresIn
required
Seconds
integer
refreshToken
Absent for web clients: set as the httpOnly cookie rk_refresh
string
refreshTokenExpiresAt
string format: date-time
Examplegenerated
{ "accessToken": "example", "accessTokenExpiresIn": 1, "refreshToken": "example", "refreshTokenExpiresAt": "2026-04-15T12:00:00Z"}Request is malformed (validation_failed)
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
Localized by Accept-Language
string
details
object
key
additional properties
requestId
required
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}Not authenticated
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
Localized by Accept-Language
string
details
object
key
additional properties
requestId
required
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}Rate limited; see the Retry-After header
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
Localized by Accept-Language
string
details
object
key
additional properties
requestId
required
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}