Fetching User Profile
Last updated
Last updated
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.
GET
https://oauth-account-noneu.truecaller.com/v1/userinfo
Headers
Name | Type | Description |
---|---|---|
200: OK
{
“sub”: “13627101294235520", “given_name”: “xyz”, “family_name”: “xyz”, “phone_number”: “91xxxxxxxxxx", “email”: “pqr@gmail.com”, “picture”: “https://www.truecaller.com/xyz”, “gender”: “male/female”, “phone_number_country_code”: “IN”, “phone_number_verified”: true, ˇ“address”: { “locality”: “Bangalore”, “postal_code”: “5xxxxx" } }
401: Unauthorized If authentication type is not bearer token
404: Not Found Profile information is not present for the user
500: Internal Server Error Failed to validate token due to server error
401: Unauthorized Token in invalid/ expired
422: Unprocessable Entity openid scope missing in initial request
500: Internal Server Error Unexpected error at server side
Sample cURL request :
Authorization*
"Bearer <ACCESS_TOKEN>"
Insert access token from the previous step - fetching user token