API Documentation
Sign In APIs
- Sign In with OTP
- Sign In with Magic Link
- Sign In with OTP Link
- Sign In with OAuth
- Sign In with Phone Call Approval
Messaging
- WhatsApp
Session Management APIs
Verify Frontend SDK token
Verify token
Validates user details by exchanging the token obtained from the otplessUser object for the user’s information. This server-to-server call requires authentication using the client ID and secret. Also the secureInfo details will only be included when the Secure SDK is integrated as part of the authentication implementation.
curl --location 'https://user-auth.otpless.app/auth/v1/validate/token' \
--header 'Content-Type: application/json' \
--header 'clientId: YOUR_CLIENT_ID' \
--header 'clientSecret: YOUR_CLIENT_SECRET' \
--data '{
"token": "RECEIVED_TOKEN_FROM_OTPLESS"
}'
{
"token": "TOKEN_VALUE",
"status": "SUCCESS",
"userId": "USER_ID",
"timestamp": "2024-10-15T14:07:14Z",
"identities": [
{
"identityType": "MOBILE",
"identityValue": "919999999999",
"channel": "OAUTH",
"methods": [
"TRUE_CALLER"
],
"verified": true,
"verifiedAt": "2024-10-15T14:07:14Z"
}
],
"network": {
"ip": "103.246.62.146",
"timezone": "Asia/Kolkata",
"ipLocation": {
"accuracyRadius": 1000,
"city": {},
"subdivisions": {},
"country": {
"code": "IN",
"name": "India"
},
"continent": {
"code": "AS"
},
"latitude": 21.9974,
"longitude": 79.0011,
"asn": {
"asn": "139570",
"name": "Spectrum Internet Services",
"network": "103.246.62.0/23"
}
}
},
"deviceInfo": {
"userAgent": "Mozilla/5.0 (Linux; Android 14; RMX3998 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 otplesssdk",
"platform": "Linux aarch64",
"vendor": "Google Inc.",
"browser": "Chrome",
"connection": "4g",
"language": "en-GB",
"cookieEnabled": true,
"screenWidth": 360,
"screenHeight": 800,
"screenColorDepth": 24,
"devicePixelRatio": 3,
"timezoneOffset": -330,
"cpuArchitecture": "8-core",
"fontFamily": "sans-serif",
"deviceId": "DEVICE_ID",
"browserInfo": {
"browserName": "Other",
"os": "Android",
"osVersion": "14",
"device": "Generic Smartphone"
}
},
"secureInfo": {
"incognito": false,
"confidence": {
"score": 1,
"revision": "v1.1"
},
"bot": {
"result": "notDetected"
},
"rootApps": {
"result": false
},
"emulator": {
"result": false
},
"vpn": {
"result": true,
"originCountry": "unknown",
"methods": {
"timezoneMismatch": false,
"publicVPN": true
}
},
"tampering": {
"result": false,
"anomalyScore": 0
},
"jailbroken": {
"result": false
},
"clonedApp": {
"result": false
},
"factoryReset": {
"time": "2024-10-09T10:53:31Z",
"timestamp": 1728471211
},
"frida": {
"result": false
},
"suspectScore": {
"result": 5
},
"privacySettings": {
"result": false
}
}
}
Authorizations
The clientId
used for API authentication.
The clientSecret
used for API authentication.
Body
Token received from otplessUser object.
Response
"TOKEN_VALUE"
"SUCCESS"
"USER_ID"
"2024-10-15T14:07:14Z"
"103.246.62.146"
"Asia/Kolkata"
1000
21.9974
79.0011
"Mozilla/5.0 (Linux; Android 14; RMX3998 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 otplesssdk"
"Linux aarch64"
"Google Inc."
"Chrome"
"4g"
"en-GB"
true
360
800
24
3
-330
"8-core"
"sans-serif"
"DEVICE_ID"
false
Was this page helpful?
curl --location 'https://user-auth.otpless.app/auth/v1/validate/token' \
--header 'Content-Type: application/json' \
--header 'clientId: YOUR_CLIENT_ID' \
--header 'clientSecret: YOUR_CLIENT_SECRET' \
--data '{
"token": "RECEIVED_TOKEN_FROM_OTPLESS"
}'
{
"token": "TOKEN_VALUE",
"status": "SUCCESS",
"userId": "USER_ID",
"timestamp": "2024-10-15T14:07:14Z",
"identities": [
{
"identityType": "MOBILE",
"identityValue": "919999999999",
"channel": "OAUTH",
"methods": [
"TRUE_CALLER"
],
"verified": true,
"verifiedAt": "2024-10-15T14:07:14Z"
}
],
"network": {
"ip": "103.246.62.146",
"timezone": "Asia/Kolkata",
"ipLocation": {
"accuracyRadius": 1000,
"city": {},
"subdivisions": {},
"country": {
"code": "IN",
"name": "India"
},
"continent": {
"code": "AS"
},
"latitude": 21.9974,
"longitude": 79.0011,
"asn": {
"asn": "139570",
"name": "Spectrum Internet Services",
"network": "103.246.62.0/23"
}
}
},
"deviceInfo": {
"userAgent": "Mozilla/5.0 (Linux; Android 14; RMX3998 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 otplesssdk",
"platform": "Linux aarch64",
"vendor": "Google Inc.",
"browser": "Chrome",
"connection": "4g",
"language": "en-GB",
"cookieEnabled": true,
"screenWidth": 360,
"screenHeight": 800,
"screenColorDepth": 24,
"devicePixelRatio": 3,
"timezoneOffset": -330,
"cpuArchitecture": "8-core",
"fontFamily": "sans-serif",
"deviceId": "DEVICE_ID",
"browserInfo": {
"browserName": "Other",
"os": "Android",
"osVersion": "14",
"device": "Generic Smartphone"
}
},
"secureInfo": {
"incognito": false,
"confidence": {
"score": 1,
"revision": "v1.1"
},
"bot": {
"result": "notDetected"
},
"rootApps": {
"result": false
},
"emulator": {
"result": false
},
"vpn": {
"result": true,
"originCountry": "unknown",
"methods": {
"timezoneMismatch": false,
"publicVPN": true
}
},
"tampering": {
"result": false,
"anomalyScore": 0
},
"jailbroken": {
"result": false
},
"clonedApp": {
"result": false
},
"factoryReset": {
"time": "2024-10-09T10:53:31Z",
"timestamp": 1728471211
},
"frida": {
"result": false
},
"suspectScore": {
"result": 5
},
"privacySettings": {
"result": false
}
}
}