# Access Google Profile Data

**URL:** <https://forums.nylas.com/t/access-google-profile-data/323>\
**Category:** Question and Answers\
**Tags:** authentication\
**Created:** [August 2, 2024, 1:07pm UTC](https://forums.nylas.com/t/access-google-profile-data/323 "2024-08-02T13:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarmo](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@Jarmo](https://forums.nylas.com/u/Jarmo)\
**Post date:** [August 2, 2024, 1:07pm UTC](https://forums.nylas.com/t/access-google-profile-data/323/1 "2024-08-02T13:07:00Z")

</div>

Hey guys,

I am pretty new to nylas and want to receive the userinfo.profile from google to get the avatar url for my application. Is there a preferred way to do it with nylas?

---

<div class="post-metadata">

**Author:** ![Blag](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/blag/32/9_2.png) [@Blag](https://forums.nylas.com/u/Blag)\
**Post date:** [August 3, 2024, 4:58am UTC](https://forums.nylas.com/t/access-google-profile-data/323/2 "2024-08-03T04:58:20Z")

</div>

Hello @Jarmo

We don’t provide profile information directly, so you will need to access Google’s APIs directly. Here’s a general approach using Google’s People API to retrieve profile information:

1. **Enable the People API** on your Google Cloud Platform project where you have set up your Nylas integration.
2. **Obtain the appropriate Google scopes** during your OAuth flow. For accessing photos, you might need scopes like `https://www.googleapis.com/auth/userinfo.profile` or `https://www.googleapis.com/auth/photoslibrary.readonly` .
3. **Use the access token** to make requests to Google’s People API.Here is an example of how you might use a cURL command to retrieve profile information from Google:

bash  
curl -H “Authorization: Bearer YOUR\_ACCESS\_TOKEN”   
“[https://people.googleapis.com/v1/people/me?personFields=photos](https://people.googleapis.com/v1/people/me?personFields=photos)”

Replace `YOUR_ACCESS_TOKEN` with the access token you obtained through Nylas’ Hosted Auth.
