# OAuth authentication fails with 500 error

**URL:** <https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032>\
**Category:** Authentication\
**Created:** [March 2, 2023, 1:56pm UTC](https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032 "2023-03-02T13:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yo.shimizu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yo.shimizu/32/46037_2.png) [@yo.shimizu](https://devforum.zoom.us/u/yo.shimizu)\
**Post date:** [March 2, 2023, 1:56pm UTC](https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032/1 "2023-03-02T13:56:18Z")

</div>

**API Endpoint(s) and/or Zoom API Event(s)**  
[https://zoom.us/oauth/authorize](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](https://zoom.us/oauth/authorize?response_type=code&client_id=%7BCLIENT_ID%7D&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](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**

```auto
{
  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](https://zoom.us/oauth/authorize?response_type=code&client_id=%7BCLIENT_ID%7D&redirect_uri=https%3A%2F%2Fpath%2Fto%2Fcallback)

**Request URL**  
[https://marketplace.zoom.us/api/v1/apps/JUHYLUdQQoKt7\_ybbqFf5g/subscriptions/@accept](https://marketplace.zoom.us/api/v1/apps/JUHYLUdQQoKt7_ybbqFf5g/subscriptions/@accept)

**header**

```auto
: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**

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

```

---

<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:** [March 2, 2023, 9:11pm UTC](https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032/2 "2023-03-02T21:11:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yo.shimizu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yo.shimizu/32/46037_2.png) [@yo.shimizu](https://devforum.zoom.us/u/yo.shimizu)\
**Post date:** [March 6, 2023, 9:44am UTC](https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032/3 "2023-03-06T09:44:20Z")

</div>

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.

---

<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:** [March 6, 2023, 2:59pm UTC](https://devforum.zoom.us/t/oauth-authentication-fails-with-500-error/84032/4 "2023-03-06T14:59:57Z")

</div>

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