Fetching User Profile

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

NameTypeDescription

Authorization*

"Bearer <ACCESS_TOKEN>"

Insert access token from the previous step - fetching user token

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 :

curl --location --request GET 'https://oauth-account-noneu.truecaller.com/v1/userinfo' \
--header 'Authorization: Bearer testtoken'

Last updated

Copyright © 2009-2024 True Software Scandinavia AB. All rights reserved. Truecaller™ is a registered trademark.