Get current user id and info from oAuth connection


#1

Hi, I see there's this (https://developers.hubspot.com/docs/methods/get-account-details) but it only gives the "portalId" (which I assume is the same across all users under the same account).

I'd like to get a user_id or something that identifies the user logging in via oAuth. This is to prevent users from creating duplicate accounts in our integration and allowing us to uniquely ID the user.


#2

Hi @dedupely,

You can use the 'Get Information for OAuth 2.0 Access Token' endpoint to see which user authorized your app for a given portal. Keep in mind though that apps are authed for an entire portal, so all users in a given portal can use the features of your integration. There isn't currently a public user API, so it's not possible to get details for all users in a portal.


#3

We're using that in the meantime. Looks like as much that we can extract from the authed user. Thanks!