curl --request POST \
--url https://api.hubapi.com/oauth/v1/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data grant_type=authorization_code \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>' \
--data 'scope=<string>'{
"accessToken": "<string>",
"expiresIn": 123,
"hubId": 123,
"idToken": "<string>",
"scopes": [
"<string>"
],
"tokenType": "<string>",
"userId": 123
}curl --request POST \
--url https://api.hubapi.com/oauth/v1/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'client_id=<string>' \
--data 'client_secret=<string>' \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data grant_type=authorization_code \
--data 'redirect_uri=<string>' \
--data 'refresh_token=<string>' \
--data 'scope=<string>'{
"accessToken": "<string>",
"expiresIn": 123,
"hubId": 123,
"idToken": "<string>",
"scopes": [
"<string>"
],
"tokenType": "<string>",
"userId": 123
}Supported products
successful operation
The access token used for authentication in API requests.
The duration in seconds for which the access token is valid.
The ID of the HubSpot account associated with the token.
The ID token that contains identity claims about the user.
The type of token, typically indicating the authentication scheme. Typically bearer.
The ID of the hubspot user for whom the token was created.
Was this page helpful?