Make a network call to fetch the userInfo using access token from step 14. The response would be corresponding to the scopes granted by the user.
{
“sub”: “13627101294235520",
“given_name”: “abc”,
“family_name”: “xyz”,
“gender”: “male/female”,
“birthdate”: “YYYY-MM-DD”,
“picture”: “https://www.truecaller.com/xyz”,
“email”: “pqr@gmail.com”,
“phone_number”: “91xxxxxxxxxx",
“phone_number_verified”: true,
“phone_number_country_code”: “IN”,
“address”:
{
“locality”: “Bangalore”,
“postal_code”: “5xxxxx"
}
}
{
"status": 40110,
"message": "Wrong authentication type"
}
{
"status": 50010,
"message": "Auth service error"
}
{
"error": 40110,
"error_description": "Unauthorized"
}
{
"error": 42201,
"error_description": "Missing profile data"
}
{
"error": 50001,
"error_description": <reason>
}
curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \
--header 'Authorization: Bearer testtoken'