How to get HubSpot Portal-Id and User-Id inside Calling SDK

Hello community!

I have added a login feature inside Calling Extension and I am storing portalId and userId is used to map data in my server.

I wanted to know is there a way to access user’s portalId and userId inside Calling Extension SDK?

Hi @ParvG

To get the Portal ID use this curl

curl --request GET \
 --url https://api.hubapi.com/account-info/v3/details \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

To get the user ID use this curl

curl --request GET \
 --url https://api.hubapi.com/settings/v3/users/ \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!