Call API keeping hapikey secrete


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?


@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.


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?


@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.


Thanks for your reply.

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


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?