# Oauth error 202 invalid expiration date

**URL:** <https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065>\
**Category:** API and Webhooks\
**Created:** [August 8, 2023, 1:21am UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065 "2023-08-08T01:21:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris14](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris14/32/50895_2.png) [@chris14](https://devforum.zoom.us/u/chris14)\
**Post date:** [August 8, 2023, 1:21am UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/1 "2023-08-08T01:21:29Z")

</div>

Our company is trying to convert to OAuth2 from JWT, but when using /oauth/authorize call, we are getting back Error 202 invalid expiration date…

[https://support.zoom.us/hc/en-us/articles/5806459833741-Zoom-billing-error-202-Invalid-Expiration-Date#:~:text=If%20you%20receive%20the%20Zoom,to%20update%20the%20expiration%20date](https://support.zoom.us/hc/en-us/articles/5806459833741-Zoom-billing-error-202-Invalid-Expiration-Date#:~:text=If%20you%20receive%20the%20Zoom,to%20update%20the%20expiration%20date).

The account we are using for testing is not a paying account (no credit card supplied). The Authorize API call we make provides the paramaters “response\_type”, “client\_id” and “redirect\_uri”, as specified by the page [OAuth for user authorized apps](https://developers.zoom.us/docs/integrations/oauth/).

Are we missing a parameter in the API call, or can we not use a “free” account for testing purposes?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 8, 2023, 6:46pm UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/2 "2023-08-08T18:46:03Z")

</div>

Hi @chris14  
Thanks for reaching out to us and welcome to our community!  
I do not think you are missing a parameter.  
Can you please share with me the entire request URL that you are sending to generate the token?  
Also, here is a link to our Docs on OAuth authorization:

> **[OAuth for user authorized apps](https://developers.zoom.us/docs/integrations/oauth/#getting-an-access-token)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![chris14](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris14/32/50895_2.png) [@chris14](https://devforum.zoom.us/u/chris14)\
**Post date:** [August 8, 2023, 11:17pm UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/3 "2023-08-08T23:17:51Z")

</div>

Thank you for replying.

The php code our dev is using is as follows:

```
$curl = curl_init();
$basic = $zoom_client_id.':'.$zoom_secret_id;
$basic_token = base64_encode($basic);

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://zoom.us/oauth/authorize?response_type=code&client_id=$zoom_client_id&redirect_uri=https://example.com",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Basic $basic_token"
  ),
));

$response = curl_exec($curl);

curl_close($curl);

```

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 9, 2023, 4:44pm UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/4 "2023-08-09T16:44:29Z")

</div>

Thanks for sharing that with me @chris14  
It looks like you are using an Oauth app to authorize.  
What I can see is that you are trying to authorize and get the token at the same time and it should be done in 2 steps.  
First, you authorize the app (using the app credentials), once that’s done then you can generate the access token

Here is a helpful guide on how to make API calls with Oauth using Postman

> [@Guide: Making a Zoom API Call with OAuth Credentials in Postman](https://devforum.zoom.us/t/guide-making-a-zoom-api-call-with-oauth-credentials-in-postman/64538):
>
> To publish an app on the Zoom Marketplace you must create an [OAuth app](https://marketplace.zoom.us/docs/guides/build/oauth-app/). When you’re ready to test making API calls, download the latest version of Postman and import the Zoom API collections following the steps outlined [here](https://marketplace.zoom.us/docs/guides/guides/postman/using-postman-to-test-zoom-apis/). There are Three Ways to Set up OAuth in Postman to Make API Requests We’re going to go through three ways to set up our OAuth application credentials to successfully authorize and access the Zoom API to make requests. The “Easy” Difficulty OAuth 2.0 Set Up in Postman We’…

Also, take a look at this sample app that might help you understand the workflow better

> **[GitHub - zoom/zoom-oauth-sample-app: Sample Zoom Oauth App NodeJS app to call Zoom's...](https://github.com/zoom/zoom-oauth-sample-app)**
>
> Sample Zoom Oauth App NodeJS app to call Zoom's APIs

---

<div class="post-metadata">

**Author:** ![chris14](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chris14/32/50895_2.png) [@chris14](https://devforum.zoom.us/u/chris14)\
**Post date:** [August 10, 2023, 1:25am UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/5 "2023-08-10T01:25:43Z")

</div>

Thank you, Elisa.

I have passed this on to our dev.

---

<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:** [August 11, 2023, 1:25am UTC](https://devforum.zoom.us/t/oauth-error-202-invalid-expiration-date/93065/6 "2023-08-11T01:25:48Z")

</div>

Closed on August 11, 2023, 1:25am UTC

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