Call API keeping hapikey secrete


#1

We want to send contact data to hubspot from our web service (no UI), how we can achieve this?

We are able to send using API; but it exposes the hapikey; is there any way we can use API but hide hapikey from exposing to hacker.

Also can we make any field in contact as compulsory/mandatory?


#2

@ladp There isn’t a way to hide the API key. This is why we would recommend using OAuth2 as it is more secure as the tokens expire every 6 hours.


#3

Is there any way to OAuth without user interaction.

We need to push data into hubspot from web service, so there will not be any user interaction, how we can achieve this?


#4

@ladp Yes you can do this via a script and code it out. There are different libraries out there to help with this depending on what language or stack you are working on.


#5

Thanks for your reply.

We are using DotNet (C#), could you please point me to some documentations around this?


#6

If you put your web service on a server with an SSL and use environment variables you should be good.

And, if I’m understanding you wrong, how is the api key exposed?