OAuth via batch not interactive


Hi. I created a dev account and am new to hubspot. I’m trying to write a batch program to connect to my own instance in hubspot and insert new contacts records. How do I OAuth authenticate so a human does not have to manually Accept / Decline? My application needs a way to get an access token for my own account, outside the context of any specific user interaction. I tried Grant Type password and username and it still requires Accept by a human. Feedback appreciated …

Method to authenticate an application (instead of a user) using OAuth2 protocol

Hi @nbk69qz

Our OAuth process requires a user to be logged into HubSpot and to click the authorize button, and we don’t have a way to authenticate programmatically.

If you’re working on a custom integration that will only exist as a backend server process, then you may want to look at using an API key for authentication.


Thank you for your reply. I will use APIkey authentication.


Hi David,
Is your answer still up to date?
Is there an enhancement expected on HubSpot side for authorization by a service?

My question is related to one of the latest announcement:
“New apps will only work with OAuth 2.0”


OK, this is solved, i can use OAuth 2.0 with batch calls.


So how can we use OAuth 2.0 with batch calls?


See my answer to this problem in:


i understand that you have an answer now.


Hi guys, on this same subject I just want to confirm something to be 100% sure!

Regarding using OAuth2 rather than API keys, this is a simple “access popup box” that the user just clicks ALLOW to give access to HubSpot, so simpler to setup, but can you please confirm if the user who gave access gets his hubspot account deleted (ex. leaves the company), everything stops working until somebody else with the required permissions (that our app requests) re-clicks to oauth/allow access to our api via the same access popup box, correct?

Basically what I am asking is are we DEPENDANT on the hubspot user account to always exist for our oauth2 authenticated app to work? Or once the auth is allowed and done and working even if the user is removed or deleted the refresh/access tokens will continue to work the same way regardless?



Would anyone have the answer to my previous question?

All help is appreciated, thanks!