# 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**

| Name            | Type                      | Description                                                      |
| --------------- | ------------------------- | ---------------------------------------------------------------- |
| Authorization\* | "Bearer \<ACCESS\_TOKEN>" | Insert access token from the previous step - fetching user token |

200: OK&#x20;

{

“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'
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.truecaller.com/truecaller-sdk/android/oauth-sdk-3.2.0/integration-steps/integrating-with-your-backend/fetching-user-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
