Setting the current user as the owner using the API
We are using the OAuth2 API to create companies and contacts in hubspot. We use the PHP HubSpot API v3 SDK.
Is there a way to find out what the currently-logged-in-user is, or otherwise to automatically set the currently-logged-in-user as the owner of the records that are created?
Thanks! Yeah, I had found that endpoint. I was considering getting that list and comparing the emailaddresses against the emailaddress of the currently-logged-in-user on our side. But then I realized that there is no guarantee that a user of our platform, that uses OAuth2 to connect with their HubSpot account, is using the same email address on both platforms.
When I'm logging in directly on HubSpot, and create a contact or company, I'm automatically assigned as the owner. You'd think there was a way to do the same when I'm logged in through OAuth2, and create a contact or company through API calls.