OTP Verification
POST : https://<base_url>/digipay/v3/auth/verify_otp
This API is used to verify OTP send via send OTP
BODY PARAMS:-
Parameter | Type | Description | Value |
---|---|---|---|
dial_code | String | Country dial code. | +91 |
phone_number | String | hone number of the user. | 123456789 |
user_type | Int | Type of user (e.g., 1 for employee, 2 for customer).. | 2 |
otp_type | Int | Type of OTP (1 for SMS OTP, 2 for Email OTP, etc.) | 1 |
otp | String | The OTP value generated for verification. | 321465 |
device_type | Int | The type of device used by the user (e.g., ""android"", ""ios""). | 2 |
device_id | String | The device ID associated with the user's device. | a1b2c3 |
device_unique_id | String | A unique identifier for the user's device. | 1234 |
HEADERS:-
Parameter | Type | Description | Value |
---|---|---|---|
Authorization | String | It is a combination of type and token to authenticate user for the given token | Token duik7309njdlkhdauhknksadhjkas986876sd873j |
CompanyID | String | Company_id is a unique primary id, that is represent company detail | 76bc712200ca444fa334f9e55e5fd7a8 |
Request Body:-
Request Example
curl --request POST \
--url http://192.168.1.102:8014/digipay/v3/auth/verify_otp \
--header 'Authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NWY0ZDI1MDliZmU0NTBmYTg4MTVhNTU5Njk3YmM0NyIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjkzNTIxOTU1fQ.9oWwUzlFzmYB1ZOhaVamxKJH6DsMO8tFue2kbg2YyoI' \
--header 'CompanyID: 76bc712200ca444fa334f9e55e5fd7a8' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"dial_code": "+91",
"phone_number": "555-1234",
"user_type": 2,
"otp_type": 2,
"otp": "321465",
"device_type": 2,
"device_id": "a1b2c3",
"device_unique_id": "1234"
}
'
Response:-
Response 200(OK)
{
"success": 1,
"error": [],
"data": {
"message": "Phone number successfully verified.",
"token": {
"type": "Token",
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NDc0OTEyMjR9.S_YjH-vZSvv495p5TkRsR3m10fGECdUHGlrXuNNSp-UUmiH-uIm4meYykEiy6BJzvEfjUkZXM3QAZAenQlB2IQ"
},
"user_id": "bccea2ac4114b5aaa790221f72d3799"
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}
RESPONSES :-
Status Code | Description |
---|---|
200 | OK |
400 | Bad Request |
404 | Not Found |
500 | Internal Server Error |