# API Refresh Tokens: 400 "Internal Error"

**URL:** <https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605>\
**Category:** API and Webhooks\
**Created:** [August 28, 2021, 9:00pm UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605 "2021-08-28T21:00:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jman/32/27895_2.png) [@Jman](https://devforum.zoom.us/u/Jman)\
**Post date:** [August 28, 2021, 9:00pm UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605/1 "2021-08-28T21:00:59Z")

</div>

Hi,

I’m periodically refreshing API tokens every hour. This has worked for about 100 refreshes, until the API returned an error 400:

`requests.exceptions.RequestException: Status Code: 400 Error "invalid_request" Reason "Internal Error"`

To refresh I’m making a POST request with python’s requests library with refresh\_token=(the refresh token) and grant\_type=“refresh\_token”. Authentication is the client ID and secret.

I’m wondering if there is more clarification on this “internal error” reason. Nothing has changed on my end leading up to the sudden error 400.

I’ve read the error definitions here [https://marketplace.zoom.us/docs/api-reference/error-definitions](https://marketplace.zoom.us/docs/api-reference/error-definitions) but don’t believe the data I’m sending is invalid. Does internal mean this is on zoom’s side? Are “api outages” an occurrence?

Thank you!

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [August 31, 2021, 1:33pm UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605/2 "2021-08-31T13:33:07Z")

</div>

Hi @Jman,

This could be happening for a few different reasons. Can you see my post here and let me know if it helps?

> [@Timeout when refreshing access tokens](https://devforum.zoom.us/t/timeout-when-refreshing-access-tokens/51049/2):
>
> Hi @bo.zhang, Thanks for reaching out about this. This can happen for a few different reasons. These are the most common: If a new access token is generated, both the previous access token and refresh token will become invalid. So you will need to update each of these tokens each time you request a new access token. Another situation that can arise is if multiple requests are sent using the same refresh token within a short amount of time, a race condition may prevent all requests from go…

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![Jman](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jman/32/27895_2.png) [@Jman](https://devforum.zoom.us/u/Jman)\
**Post date:** [August 31, 2021, 4:00pm UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605/3 "2021-08-31T16:00:06Z")

</div>

Hi @will.zoom ,

That seems to be similar to our problem! The scenarios in which it could occur that you outlined don’t seem applicable to our situation though - In that case can I send the token and timestamp to developer@zoom for a more specific look into it? I’d love to know more about this “invalid format” errror response we got

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [September 2, 2021, 7:52pm UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605/4 "2021-09-02T19:52:46Z")

</div>

Hey @Jman,

Yes, please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that email, please include the request that you’re making, the response and the access\_token that was used.

We’ll use that to look into this further.

Thanks,  
Max

---

<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 3, 2021, 5:53am UTC](https://devforum.zoom.us/t/api-refresh-tokens-400-internal-error/56605/5 "2021-10-03T05:53:32Z")

</div>

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