Where is my user ID?

I can find every imaginable ID (portal, owner, etc.), but I haven’t been able to find my user ID after hours of searching. Where is it (and why is it hidden)?

Hi, @Renegade.

At this time, user data is inaccessible via the public APIs. The HubSpot app leverages user IDs on the back end, but none of the public APIs rely on it, which is probably why it isn’t surfaced. Instead, owner IDs are used from in everything from contacts to engagements.

The only endpoints which return user IDs are Get Information for OAuth 2.0 Access Token and Get Information for OAuth 2.0 Refresh Token. These endpoints also return the user email, which can be used to associate a user ID with an owner ID via this endpoint.

That said, may I ask what you wish to do with the user_id? None of the public endpoints accept it.

Various commands in the Timeline API require the user id to execute. E.g.,:

'https://api.hubapi.com/integrations/v1/<<appId>>/timeline/event-types/<<eventTypeId>>?hapikey=<<developerHapikey>>&userId=<<yourUserId>>'

Hi, @Renegade.

Apologies for the delayed response.

Ah, thanks for clarifying! Since the Timeline API requires OAuth authentication, you can use this endpoint to fetch the user_id associated with the application.

Thanks. Also, it’s visible in the “My Apps” page with the HAPI key.