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