Exchange credentials for an access token
POST
/oauth/token
const url = 'https://api.hedgespecialty.com/api/v1/oauth/token';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.hedgespecialty.com/api/v1/oauth/tokengrant_type=authorization_code (+ PKCE) and grant_type=refresh_token
for per-user connections; grant_type=client_credentials with your
client_id + client_secret for machine credentials. Form-encoded.
Responses
Section titled “Responses”Token response ({access_token, token_type, expires_in, scope})
Invalid request or grant
Invalid credentials