Authorization
POST Auth
Path
/api/auth
Регистрация пользователя в системе/авторизация.
Click to expand to see the details
cURL Example:
curl --location --request POST 'https://barakat.tekmates.pro/api/auth' \
--header 'Content-Type: application/json' \
--data-raw '{
"phoneNumber": "+79999990044"
}'
Request Body:
{
"phoneNumber": "+79999990044"
}
Response Body:
{
"verificationToken": <verificationToken>,
"resendTime": 60
}
POST Validate OTP
Path
/api/auth/validate
Валидация ОТП кода после успешного этапа регистрации.
Click to expand to see the details
cURL Example:
curl --location --request POST 'https://barakat.tekmates.pro/api/auth/validate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <verificationToken>' \
--data-raw '{
"otp": "9374"
}'
Request Body:
{
"otp": "9374"
}
Response Body:
{
"token": "<token>"
}
POST Reissue OTP
Path
/api/auth/reissue-otp
Переотправка ОТП кода после.
Click to expand to see the details
cURL Example:
curl --location --request POST 'https://barakat.tekmates.pro/api/auth/reissue-otp' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <verificationToken>' \
Response Body:
{
"resendTime": 60
}
Edited by Aleksandr Kosorukov