Get OAuth 2.0 Access Token and Refresh Tokens failue




After the first step I am redirected to Hubspot and approve the app, I am then redirected by to my server and I am trying to create a server to server OAuth request to get access token and refresh token:

I followed the documentation from:

However this request fails with error:
org.apache.oltu.oauth2.common.exception.OAuthProblemException: invalid_request, Missing parameters: access_token

Can you please help me to figure out what I am doing wrong? I am using java apache library to generate this request, it is getting a bit urgent for me and I don’t manage to solve this issue.

Thank you,


Hi Everyone,

Just for a reference, in case you are using Apache Oltu as an OAuth library:

At first I executed:

OAuthClientRequest oAuthClientRequest =

Just replaced buildQueryMessage() with --> buildBodyMessage()


@Eli_A What is your redirect Uri and what error you are receiving?