# oAuth getting access token

**URL:** <https://community.hubspot.com/t/oauth-getting-access-token/59852>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [June 27, 2022, 11:33am UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852 "2022-06-27T11:33:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmswissdive](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dmswissdive](https://community.hubspot.com/u/dmswissdive)\
**Post date:** [June 27, 2022, 11:33am UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852/1 "2022-06-27T11:33:23Z")

</div>

Dear all

I am struggling with getting the access token from hubspot oauth server.  
Read a few related comments, tried several suggestions, but still no success.  
Certainly I followed the respective manual, but from my side of view, there are somehow a missing part.  
The manual does not contain an example of a URL how it should looks like.

As close to the manual, my URL to get the access token looks like this:

-X POST  
--header accept: application/json\  
--header content-type: application/x-www-form-urlencoded\  
[https://api.hubapi.com/oauth/v1/token?client\_id=f2466572-8de0-448d-9147-109e294701eb&client\_secret=56e329a6-0912-4aca-af3d-4e5d12ac3782&code=eu1-da29-950c-4a94-8afb-7c2015d2bee6&grant\_type=authorization\_code](https://api.hubapi.com/oauth/v1/token?client_id=f2466572-8de0-448d-9147-109e294701eb&client_secret=56e329a6-0912-4aca-af3d-4e5d12ac3782&code=eu1-da29-950c-4a94-8afb-7c2015d2bee6&grant_type=authorization_code)

At least I get back a message in JSON Format: It says: Missing or unknown grant type

May anybody give me a hint where I am wrong or better, can tell me how the calling URL should look like?  
Any kind of help in this case is very welcome.

Best regards  
dmswissdive

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 27, 2022, 9:45pm UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852/2 "2022-06-27T21:45:38Z")

</div>

Hey, @dmswissdive 👋 Working with OAuth is frustrating at times, for sure.

@Kevin-C @mangelet @RomanGruit any ideas for helping @dmswissdive get setup and running? Or suggestions on what additional information they can include to help the community better understand the root issue?

Thank you!

---

<div class="post-metadata">

**Author:** ![arquadrado](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@arquadrado](https://community.hubspot.com/u/arquadrado)\
**Post date:** [July 8, 2022, 1:31pm UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852/3 "2022-07-08T13:31:39Z")

</div>

The accepted solution does not contain any information about the how to solve the problem. What am I missing here? I am, as well, having problems in getting access tokens from my application code.

---

<div class="post-metadata">

**Author:** ![HubSpot2023](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@HubSpot2023](https://community.hubspot.com/u/HubSpot2023)\
**Post date:** [July 18, 2023, 6:19pm UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852/4 "2023-07-18T18:19:46Z")

</div>

Were you able to access OAuth? I am too in the same boat and just getting started. I have used APIs for CRM through Postman before but trying to get started with this CRM HubSpot. Can you help?

---

<div class="post-metadata">

**Author:** ![dmswissdive](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dmswissdive](https://community.hubspot.com/u/dmswissdive)\
**Post date:** [July 19, 2023, 6:34am UTC](https://community.hubspot.com/t/oauth-getting-access-token/59852/5 "2023-07-19T06:34:27Z")

</div>

Hi

No, sadly I was not able to run with oauth. Honestly I did not spend much time for this. In fact, we have given up this project, for other reasons, not about struggling with oauth, so I didn’t go very deep into this topic.
