POST
/
oauth
/
v1
/
token
Get or refresh OAuth 2.0 tokens
curl --request POST \
  --url https://api.hubapi.com/oauth/v1/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=authorization_code \
  --data 'client_id=<string>' \
  --data 'client_secret=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'code=<string>'
{
  "access_token": "<string>",
  "refresh_token": "<string>",
  "expires_in": 123
}

Body

application/x-www-form-urlencoded

Response

200
application/json

Tokens retrieved successfully

The response is of type object.