Jul 16, 2020 8:32 AM - edited Jul 16, 2020 8:41 AM
I am creating OAuth in our application I am able to get code plz ref docs: https://developers.hubspot.com/docs/api/oauth-quickstart-guide
I am stuck on step 4 :
Exchange authorization code for tokens
below Is java spring boot code for get token API call.
Jul 17, 2020 1:55 AM
Looking at the code, I believe this is likely because your team is using content-type: application/json however, the content type for the get OAuth 2.0 access and refresh tokens endpoint is application/x-www-form-urlencoded. As documented here: Get OAuth 2.0 access and refresh tokens.
Could you either remove the header or change the header from application/json to application/x-www-form-urlencoded and see if it works?
Aug 19, 2020 8:33 AM
We are experiencing the same issue. We first experienced a media type error and used the direction from this post to resolve it by adding the JSON application content type. Now we're getting the unknown or missing grant type error.
Aug 20, 2020 2:56 AM