How to get the Id of the currently logged in Hubspot user?

I’m aware there’s other topics discussing this, but neither had a clear resolution to this problem.

So my use case is: I want to create a CRM Card with an ‘Assign to me’ button for Tickets (since Hubspot’s process of assigning a record to yourself requires a bazillion clicks and typing).

So logically, I think I’d need to

  1. Get the ID of the currently logged in user.
  2. Use that ID to get that user’s corresponding Owner ID, using GET/crm/v3/owners/{ownerId}
  3. Get the ID of the currently opened ticket.
  4. Update that Ticket’s Owner property with the Owner ID from 2.

But I can’t seem to figure out the endpoint for 1. Anyone have an idea?

Hi @Bob2245,

When the CRM makes a data fetch request to display the the CRM card, one of the parameters that is passed along is userID: Accounts Dashboard | HubSpot

Action hooks also return the userId:

Best,