OAuth authentication fails with 500 error

API Endpoint(s) and/or Zoom API Event(s)
https://zoom.us/oauth/authorize

Description
For OAuth authentication with the Zoom app
When you access https://zoom.us/oauth/authorize?response_type=code&client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2Fpath%2Fto%2Fcallback An error was encountered when processing your request" is displayed and authentication fails.

I checked the network and confirmed that https://marketplace.zoom.us/api/v1/apps/JUHYLUdQQoKt7_ybbqFf5g/subscriptions/@accept returned a 500 error, but I haven’t been able to find out more about the cause.

Error

{
  code: 500;
  error: "Internal Server Error";
  message: "An error was encountered when processing your request";
  sid: "4457c4ff26b68f71";
  status: 500;
  tid: "4457c4ff26b68f71";
  timestamp: 1677737799502;
  trackingId: "MP_0d4970e095574e589a5d7004abea2577";
}

How To Reproduce
Access https://zoom.us/oauth/authorize?response_type=code&client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2Fpath%2Fto%2Fcallback

Request URL
https://marketplace.zoom.us/api/v1/apps/JUHYLUdQQoKt7_ybbqFf5g/subscriptions/@accept

header

:authority: marketplace.zoom.us
:method: POST
:path: /api/v1/apps/JUHYLUdQQoKt7_ybbqFf5g/subscriptions/@accept
:scheme: https
accept: application/json, text/plain, */*
accept-encoding: gzip, deflate, br
accept-language: ja,en-US;q=0.9,en;q=0.8
cache-control: no-cache
content-length: 316
content-type: application/json
cookie: {COOKIE}
origin: https://marketplace.zoom.us
pragma: no-cache
referer: https://marketplace.zoom.us/authorize/{KEY}
sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
x-auth-token: {AUTH_TOKEN}
x-zm-csrf-token: {CSRF_TOKEN}

payload

{
  authorizedScopes: [];
  clientId: {CLIENT_ID};
  delegatedPermissions: false;
  grantType: "";
  redirectUrl: "https%3A%2F%2Fpath%2Fto%2Fcallback";
  responseType: "code";
  rnd: "";
  scopes: [];
  signOffTos: true;
  state: "6n0voDRGi4V0Mv1wR0mP";
  userCode: "";
}

Hi @yo.shimizu
Thanks for reaching out to the Zoom Developer forum, I am happy to help here!
Can you please make sure to pass scopes in your payload when authenticating your app.

Also, could you point me to the Docs you are following so I can take a look at them

Cheers,
Elisa

Thanks for answering.

When I checked again based on what you pointed out, the cause was that the scope was not set on the OAuth app side.

500 error no longer occurs by adding scope setting.

Good to hear the issue has been resolved @yo.shimizu
Feel free to reach out to us if you need anything else.
Cheers,
Elisa