APIs & Integrations

Guillermo_Cerez
Member

Get all VIDs with token through API

Hi,

We get all the VIDs contact through the API with the Token with a python script. But we have a problem because we have this error (requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘api.hubapi.com’, port=443): Max retries exceeded with url: /contacts/v1/contact/utk/b20b6e3ffd5f48b83e141d0f6e7e9620/profile?hapikey=3017233d-d83b-4093-bc7c-198f7a840546).

We have a giant number of tokens and we want to get all the VIDs at the same time or at least in blocks.

Thanking in advance and keen regards

0 Upvotes
3 Replies 3
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get all VIDs with token through API

Hi @Guillermo_Cerezo,

There’s currently no public endpoint to pull the usertokens associated with a particular contact record. In most cases, it’s better to use the email address/vid when hitting the contacts API. Could you give me some more information as to why you’re looking to pull the usertokens associated with a contact? If you only have access to the usertoken, you can still use the get contact by usertoken endpoint to get a single contact by usertoken.

Get a contact by its user token

GET /contacts/v1/contact/utk/:contact_utk/profile - For a given portal, return information about a single contact by its User Token (hubspotutk)

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get all VIDs with token through API

Hi @Guillermo_Cerezo,

There isn’t currently an endpoint to get a group of contacts by their usertokens. You can get groups of contacts by their id or by their email address. Based on that error, it sounds like you might be hitting your rate limit. You can find out more on the API Usage Guidelines page, but the HubSpot APIs have a 10 requests per second and 40,000 requests per day limit.

API Usage Guidelines | HubSpot API

Guidelines explaining the limits of the HubSpot APIs

0 Upvotes
Guillermo_Cerez
Member

Get all VIDs with token through API

Hi @Derek_Gervais, thank you so much for your response. And it is possible to get the tokens associated to one VID/Email with some endpoint??

Thanks!

0 Upvotes