# "status":"BAD\_GRANT\_TYPE","message":"missing or unknown '

**URL:** <https://community.hubspot.com/t/status-bad-grant-type-message-missing-or-unknown/16956>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [October 29, 2019, 2:35pm UTC](https://community.hubspot.com/t/status-bad-grant-type-message-missing-or-unknown/16956 "2019-10-29T14:35:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdlm](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jdlm/32/30191_2.png) [@jdlm](https://community.hubspot.com/u/jdlm)\
**Post date:** [October 29, 2019, 2:35pm UTC](https://community.hubspot.com/t/status-bad-grant-type-message-missing-or-unknown/16956/1 "2019-10-29T14:35:55Z")

</div>

Hi,

I know this seems to be a common issue but I really can’t see where my request is wrong and why I get the following error everytime I try to get an Access Token (once I receive an authorization\_code):

‘{“status”:“BAD\_GRANT\_TYPE”,“message”:“missing or unknown ’ +  
'grant ’ +  
'type”,“correlationId”:“0bebdeb8-95dc-4809-a80e-25ffd3c5954f”,“requestId”:“7d17b79acdf14906784cc709b8c04458”}’

Here is my the payload of my POST request:

body: ‘{“client\_id”:“d3bea0f5-02a5-4e08-a731-e5532d8ede5a”,“client\_secret”:“XXXX-193f-4ffe-9f50-088b1cc1ae75”,“code”:“3797cd0b-01ea-4e58-89b4-59b6778eb0c7”,“grant\_type”:“authorization\_code”,“redirect\_uri”:“[http://localhost:3001/callback?](http://localhost:3001/callback?)”}’

Any help is appreciated

---

<div class="post-metadata">

**Author:** ![jdlm](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jdlm/32/30191_2.png) [@jdlm](https://community.hubspot.com/u/jdlm)\
**Post date:** [October 29, 2019, 3:14pm UTC](https://community.hubspot.com/t/status-bad-grant-type-message-missing-or-unknown/16956/2 "2019-10-29T15:14:30Z")

</div>

Please ingore. I just figured it out:

I was putting all the parameters in the Body of my POST request instead of having no body and having the paramaters as query parameters. Also making sure the headers contain ‘Content-Type: application/x-www-form-urlencoded;charset=utf-8’
