# Get access\_token and refresh\_token Via Postman

**URL:** <https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [June 25, 2019, 5:42pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968 "2019-06-25T17:42:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ted12](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ted12/32/53612_2.png) [@ted12](https://community.hubspot.com/u/ted12)\
**Post date:** [June 25, 2019, 5:42pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/1 "2019-06-25T17:42:11Z")

</div>

I need to get an authorization code which will be used by a middleware tool (not user interaction, no web browser login, just code).

About 3 months ago I used Postman to get an access\_token and refresh\_token which I can then use in the middleware code.

HubSpot OAuth (Authorization Code) no longer seems to work with Postman. See the image attached. Any support would be appreciated.

 ![hubspot_problem.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/1X/66b423e00f61914dc1fb1ff7560fa1632b08f94d.jpeg)

---

<div class="post-metadata">

**Author:** ![ted12](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ted12/32/53612_2.png) [@ted12](https://community.hubspot.com/u/ted12)\
**Post date:** [June 25, 2019, 6:20pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/2 "2019-06-25T18:20:43Z")

</div>

Problem resolved I needed to include this in the scope “transactional-email oauth”.

---

<div class="post-metadata">

**Author:** ![ted12](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ted12/32/53612_2.png) [@ted12](https://community.hubspot.com/u/ted12)\
**Post date:** [June 25, 2019, 6:39pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/3 "2019-06-25T18:39:02Z")

</div>

One more note, when Postman pops open its browser window and presents the hubspot login screen I needed to select the “main” hubstpot account, that is the one used to review billing, reports and so on NOT the developer account which holds the newly created app and client id /secrets used in Postman. A little counter-intuitive since the app account is what I’m obtaining the acces\_token and refresh\_token for but once I guessed correctly all worked.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 25, 2019, 7:58pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/4 "2019-06-25T19:58:51Z")

</div>

Welcome, @ted12.

I’m glad you resolved the matter!

To clarify, you are actually receiving access and refresh tokens to the _production_ account, not the developer account where your app lives. This mimics a user in a client account granting your app access to their tools and data. Developer accounts do not contain tools like the the website builder and email tool.

---

<div class="post-metadata">

**Author:** ![nimishgoray](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nimishgoray/32/43872_2.png) [@nimishgoray](https://community.hubspot.com/u/nimishgoray)\
**Post date:** [June 25, 2021, 11:03am UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/5 "2021-06-25T11:03:08Z")

</div>

Is there any way to make the flow totally automated? We need to implement a server-server API call and cannot have any manual intervention.

---

<div class="post-metadata">

**Author:** ![MDuck\_1](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@MDuck\_1](https://community.hubspot.com/u/MDuck_1)\
**Post date:** [January 16, 2023, 2:03pm UTC](https://community.hubspot.com/t/get-access-token-and-refresh-token-via-postman/14968/6 "2023-01-16T14:03:40Z")

</div>

Have you found any solution to that?  
We’re facing the same problem.
