APIs & Integrations

shazeemsanofar
Member

BAD_GRANT_TYPE

I am trying to get the OAuth Token using Hubspot API and it is throwing me the following error.

 

{

      status: 'BAD_GRANT_TYPE',

      message: 'missing or unknown grant type',

      correlationId: '2cbd0077-f79d-4c2c-8efb-2fb9f7081431'

    }

 

API:  https://api.hubapi.com/oauth/v1/token

 

Method: POST

Body: 

 {

  grant_type: 'authorization_code',

  client_id: 'xxxxxxx',

  client_secret: 'xxxxxxx',

  redirect_uri: 'xxxxxxx',

  code: 'xxxxxxxx'

}

 

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

BAD_GRANT_TYPE

Hi, @shazeemsanofar 👋 Welcome to the community. One request — can you post the full headers (minus your key or token), please? It should include this:

Content-Type:  application/x-www-form-urlencoded;charset=utf-8

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes