# Refresh token is giving response "reason":"Invalid Token!","error":"invalid\_request"

**URL:** <https://devforum.zoom.us/t/refresh-token-is-giving-response-reason-invalid-token-error-invalid-request/28481>\
**Category:** API and Webhooks\
**Created:** [August 28, 2020, 6:14pm UTC](https://devforum.zoom.us/t/refresh-token-is-giving-response-reason-invalid-token-error-invalid-request/28481 "2020-08-28T18:14:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsaxena](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@nsaxena](https://devforum.zoom.us/u/nsaxena)\
**Post date:** [August 28, 2020, 6:14pm UTC](https://devforum.zoom.us/t/refresh-token-is-giving-response-reason-invalid-token-error-invalid-request/28481/1 "2020-08-28T18:14:47Z")

</div>

Hi  
We have business account. I am facing one issue earlier it were working for me in my development environment but suddenly something happened and getting error. Just for your information we are storing in database of access\_token and refresh\_token and on expiring current current token invoking refresh token api with refresh\_token you can see in code. earlier it were working but not sure why suddenly it start giving error.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/b/b36861f6f5fde59fc0b94965378c6c4e0d778654.png)

When I am create very first token with grant\_type=authorization\_code it is working fine and I am getting token from zoom server.

**But I having issue with grant\_type=refresh\_token** - here is my code in Adobe ColdFusion-

var wsReqUrl =this.wsZoomAuthUrl & “/token?” & “grant\_type=refresh\_token&refresh\_token=” & wcqLastRefreshToken.refresh\_token;  
var authorization= wcsZoomEncode.generateCode(ClientId, ClientSecret);  
var h = new com.adobe.coldfusion.http();  
h.setURL(wsReqUrl);  
h.setMethod(“post”);  
h.addParam(type=“header”,name=“Authorization”,value=“Basic #authorization#”);  
h.setResolveURL(true);  
var wcsResult = h.send().getPrefix();

I added in header during post method and without adding content type but did not helped.

1. // h.addParam(type=“header”, value=“application/x-www-form-urlencoded”, name=“Content-Type”);
2. [//h.addParam](https://h.addParam)(type=“header”, value=“application/x-www-form-urlencoded”, name=“Content-Type”);

Appreciate If someone give me quick response. My oAuth App name is **LocaloAuthApp** Please let me know if need any other information.  
Regards  
Nikhil

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 31, 2020, 8:17pm UTC](https://devforum.zoom.us/t/refresh-token-is-giving-response-reason-invalid-token-error-invalid-request/28481/2 "2020-08-31T20:17:55Z")

</div>

Hey @nsaxena,

I was not able to reproduce your issue.

Make sure you are using the [latest refresh token each time](https://marketplace.zoom.us/docs/guides/auth/oauth#refreshing). I suggest testing the [OAuth flow from scratch](https://marketplace.zoom.us/docs/guides/auth/oauth#getting-access-token) in Postman to see if you get the same error.

 ![Screen Shot 2020-08-31 at 2.17.37 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/8/8fbd9218787a5454a166b8737d5204e48fa01075.png)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 1, 2020, 6:17am UTC](https://devforum.zoom.us/t/refresh-token-is-giving-response-reason-invalid-token-error-invalid-request/28481/3 "2020-10-01T06:17:57Z")

</div>

Closed on October 1, 2020, 6:17am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
