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?
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?
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:
https://www.googleapis.com/auth/userinfo.profile
or https://www.googleapis.com/auth/photoslibrary.readonly
.bash
curl -H “Authorization: Bearer YOUR_ACCESS_TOKEN”
“https://people.googleapis.com/v1/people/me?personFields=photos”
Replace YOUR_ACCESS_TOKEN
with the access token you obtained through Nylas’ Hosted Auth.