So I am sitting in the situation that I have to integrate HubSpot to our backend, works perfetly fine, for now I am just using our test account. Now i am in the situation where I need to integrate with our production accounts, which we have several of, one per country. That means that when I receive a new lead that I need to create in HubSpot I need to check first which country the lead belongs to and then I need to pick the correct HAPI Key based on that is there no other way to create a contact can’t I have some master HAPI Key to use for all accounts and then base the lead create on Country Id or Account Id?
Hi @Yantes,
For security reasons we do not support a single HAPI key being used across multiple portals. Every portal would have it’s own unique HAPI key in this instance that would be used to authenticate requests.
Having said that there is a way to achieve what you are looking to do using oAuth2. If you authenticate via oAuth you will be issued access token for every portal that installs your application and you can simply use that to authenticate requests.
More information on oAuth can be found here: Accounts Dashboard | HubSpot
We also just released (yesterday) videos explaining this process in more detail: https://academy.hubspot.com/courses/introduction-to-hubspot-apis
I hope this helps,
Jack
Thanks Jack
That answers my question just needed to get clarified that it was not possible with the use of HAPI Key.
No problem at all @Yantes happy to help clear that up! ![]()