Oauth error 202 invalid expiration date

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.

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.

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

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:

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);

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

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

Thank you, Elisa.

I have passed this on to our dev.

1 Like

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