# \[400\] missing or unknown grant type

**URL:** <https://community.hubspot.com/t/400-missing-or-unknown-grant-type/91047>\
**Category:** APIs & Integrations\
**Tags:** oauth, contacts\
**Created:** [October 4, 2023, 7:53am UTC](https://community.hubspot.com/t/400-missing-or-unknown-grant-type/91047 "2023-10-04T07:53:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![01976](https://avatars.discourse-cdn.com/v4/letter/0/dbc845/32.png) [@01976](https://community.hubspot.com/u/01976)\
**Post date:** [October 4, 2023, 7:53am UTC](https://community.hubspot.com/t/400-missing-or-unknown-grant-type/91047/1 "2023-10-04T07:53:28Z")

</div>

Hi, i am trying to request my authorization\_code via API Call: POST /oauth/v1/token.

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

Body Request:

{  
“grant\_type”: “authorization\_code”,  
"client\_id“: “e0\*\*\*”,  
"client\_secret“: “b6\*\*\*”,  
"redirect\_uri“: "[https://app\*\*\*“](https://app***%E2%80%9C),  
"code“: “eu1\*\*\*”  
}

still i get [400] missing or unknown grant type Error.

what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [October 4, 2023, 10:22am UTC](https://community.hubspot.com/t/400-missing-or-unknown-grant-type/91047/2 "2023-10-04T10:22:45Z")

</div>

Hi @01976

Please use the following curl

```lia-code-sample
curl --request POST \
 --url https://api.hubapi.com/oauth/v1/token \
 --header 'content-type: application/x-www-form-urlencoded' \
 --data 'grant_type=authorization_code&code=<PUT CODE HERE>&redirect_uri=<PUT REDIRECT URI SAME AS mentioned in app>&client_id=<PUT CLIENT ID HERE>&client_secret=<PUT CLIENT SECRET HERE>'

```

Hope this will helps you out. Please mark it as **Solution Accepted & Upvote** to help other Community member.  
Thanks!
