APIs & Integrations

gallagherrapid
Member

OAuth2 Access using grant_type: client_credentials

SOLVE

Reading through the forums it would seem it's not possible to get access to the API through OAuth2 without user interaction (via a redirect) to get the "code" required for an access token.

Am trying to build a service the users of which would not be the owners of the App used to access Hubspot. Is it possible to get a bearer token without using an http redirect (ala "client_credentials" flavour of OAuth2)?

thanks,

Ray

1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

OAuth2 Access using grant_type: client_credentials

SOLVE

Hi @gallagherrapid,

Apologies for the delayed response. This topic fell through the cracks.

You are correct. At this time, the authorization code flow is the only method supported by HubSpot APIs, so a HTTP redirect is required.

If you would like to see additional authorization flows supported, however, I recommend posting your request on the HubSpot Community Ideas Forum. This information is sent directly to our Product team and helps prioritize feature requests that have the greatest impact on our customers. I will also do my part and pass your feedback along through internal channels.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
3 Replies 3
jdavidbakr
Participant

OAuth2 Access using grant_type: client_credentials

SOLVE

@gallagherrapid - did you ever submit this to the ideas forum?  I am needing this as well but can't find it there to comment on and/or see the progress of.  I didn't want to duplicate it if it's already there.

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

OAuth2 Access using grant_type: client_credentials

SOLVE

Hi @gallagherrapid,

Apologies for the delayed response. This topic fell through the cracks.

You are correct. At this time, the authorization code flow is the only method supported by HubSpot APIs, so a HTTP redirect is required.

If you would like to see additional authorization flows supported, however, I recommend posting your request on the HubSpot Community Ideas Forum. This information is sent directly to our Product team and helps prioritize feature requests that have the greatest impact on our customers. I will also do my part and pass your feedback along through internal channels.

Isaac Takushi

Associate Certification Manager
0 Upvotes
s3c_mm
Participant

OAuth2 Access using grant_type: client_credentials

SOLVE

Four years later it still looks like client credential flow isn't available. You say we can't use a Private App if we're using webhooks, but how are we supposed to use webhooks with Public Apps, if servers can't communicate with one another? How can you afford to disable API keys (?hapi_key) at the end of this month?