POST
/
v1
/
userinfo
curl --location --request POST 'https://auth.otpless.app/auth/v1/userinfo' 	
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{
  "name": "Ashwin",
  "phone_number": "+917042507646",
  "phone_number_without_code": "7042507646",
  "country_code": "+91",
  "auth_time": "1697202873"
}

You can skip this endpoint if you are using the id_token to decode the user information without hitting the API.

Authorizations

Authorization
string
headerrequired

For accessing the secured endpoints a valid JWT token must be passed in all the requests.

Response

200 - application/json
name
string
required

The full name of the user.

phone_number
string
required

The complete phone number including the country code.

phone_number_without_code
string
required

The phone number excluding the country code.

country_code
string
required

The country code of the user's phone number.

auth_time
string
required

The authentication timestamp.

Was this page helpful?