# Using Refresh Token from Multiple Projects

**URL:** <https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [November 19, 2024, 11:04pm UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906 "2024-11-19T23:04:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WMoerke](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@WMoerke](https://community.hubspot.com/u/WMoerke)\
**Post date:** [November 19, 2024, 11:04pm UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906/1 "2024-11-19T23:04:05Z")

</div>

I have an integration setup where I am using OAuth to obtain a refresh token for a user. I am then using that refresh token to make API calls from two projects. One is the Web project that the user signs up with and the same project the refresh token was obtained from. This project can get an access token and use it with no issue. I also have another project that is listening to a queue so it can be separate and run long running tasks. When I use the refresh token from this project to obtain an access token I get an error back from the API: “status”:“MISMATCH\_REFRESH\_TOKEN\_CLIENT”,“message”:“refresh token was not issued to this client”.  
I am using the exact same parameters when getting the access token from refresh including grant\_type, client\_id, client\_secret, redirect\_uri, and refresh\_token. Since both are coming from localhost this leads me to believe that HubSpot is doing a hidden check on the port it is from, because that should be the only thing different. Is there some documentation that I am missing to explain the proper way to do this?

---

<div class="post-metadata">

**Author:** ![Bhupendra\_Kumar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bhupendra_kumar/32/67536_2.png) [@Bhupendra\_Kumar](https://community.hubspot.com/u/Bhupendra_Kumar)\
**Post date:** [November 20, 2024, 8:53am UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906/2 "2024-11-20T08:53:11Z")

</div>

Hi @WMoerke ,

In that case what you can do is you can make an custom api request to your First project where it is working and return the refresh token in response and then use it in the second project .

by the way i don’t found anything related to documented for using it in multiple places . It should work as usual

---

<div class="post-metadata">

**Author:** ![WMoerke](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@WMoerke](https://community.hubspot.com/u/WMoerke)\
**Post date:** [November 20, 2024, 2:16pm UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906/3 "2024-11-20T14:16:37Z")

</div>

Getting the refresh token in the second project is not the issue. I already have access to the refresh token in the second project. The issue is that when I make an API call from the second project to get the access token using the refresh token from the first project, I get an error back instead of the access token.

---

<div class="post-metadata">

**Author:** ![Bhupendra\_Kumar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bhupendra_kumar/32/67536_2.png) [@Bhupendra\_Kumar](https://community.hubspot.com/u/Bhupendra_Kumar)\
**Post date:** [November 20, 2024, 3:19pm UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906/4 "2024-11-20T15:19:26Z")

</div>

Hi @WMoerke ,

I was also refering to generate access token from refresh token .

---

<div class="post-metadata">

**Author:** ![WMoerke](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@WMoerke](https://community.hubspot.com/u/WMoerke)\
**Post date:** [November 21, 2024, 5:01pm UTC](https://community.hubspot.com/t/using-refresh-token-from-multiple-projects/120906/5 "2024-11-21T17:01:24Z")

</div>

It turns out another developer on the project had put in code to change the client\_id when in the development environment. I was not aware of this and didn’t expect there to be a different id for our development environment, so didn’t even check for that. This created a mismatch because one project was using our app’s id and the other was using the changed development environment id. Once I got rid of that and they were both using the correct client\_id all was working perfectly. Thanks all
