Legacy
English
cURL
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 }
Get OAuth 2.0 access and refresh tokens using an authorization code, or refresh an access token using a refresh token.
Tokens retrieved successfully
The response is of type object.
object
Was this page helpful?