# Get access\_token via Postman using Oauth API

**URL:** <https://community.hubspot.com/t/get-access-token-via-postman-using-oauth-api/101066>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [February 26, 2024, 12:29pm UTC](https://community.hubspot.com/t/get-access-token-via-postman-using-oauth-api/101066 "2024-02-26T12:29:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedjamaltariq](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ahmedjamaltariq/32/83337_2.png) [@ahmedjamaltariq](https://community.hubspot.com/u/ahmedjamaltariq)\
**Post date:** [February 26, 2024, 12:29pm UTC](https://community.hubspot.com/t/get-access-token-via-postman-using-oauth-api/101066/1 "2024-02-26T12:29:39Z")

</div>

I’m trying to test and get the access token using the Oauth v1 API endpoint and HS refresh token according to documentation, but in Postman, I always get this error. Do you know what’s wrong here?

 ![Screenshot 2024-02-26 at 13.23.08.png](https://d2qpr2jzcazej7.cloudfront.net/original/1X/64c03d9a023cf29e89f2c286896db4d46ac7125b.png)

---

<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:** [February 27, 2024, 9:06am UTC](https://community.hubspot.com/t/get-access-token-via-postman-using-oauth-api/101066/2 "2024-02-27T09:06:25Z")

</div>

Hi @ahmedjamaltariq

You can use the following API curl attached

```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=refresh_token&redirect_uri=Redirect_url&client_id=client_id&client_secret=client_secret&refresh_token=refresh_token'

```

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!
