# Zoom OAuth endpoint returning no data

**URL:** <https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746>\
**Category:** API and Webhooks\
**Created:** [June 18, 2021, 8:22pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746 "2021-06-18T20:22:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstout](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cstout/32/28413_2.png) [@cstout](https://devforum.zoom.us/u/cstout)\
**Post date:** [June 18, 2021, 8:22pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/1 "2021-06-18T20:22:55Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
I am trying to retrieve an oauth token via /oauth/token endpoint and am getting back a 200 response with no data. Zoom is calling an API I have written that takes the supplied authCode and attempts to generate a token, however I am not getting any response back from the zoom API following the guidelines here: [https://marketplace.zoom.us/docs/guides/auth/oauth#step-2-request-access-token](https://marketplace.zoom.us/docs/guides/auth/oauth#step-2-request-access-token)

**Error**  
No data returned

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**Which Endpoint/s?**  
/oauth/token

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
I am sending the following request:  
HttpRequest{  
method=POST,  
uri=[https://api.zoom.us/v2/oauth/token](https://api.zoom.us/v2/oauth/token),  
headers=[  
Pair{Authorization=Basic [clientId:clientSecretBase64 encoded]},  
Pair{Content-Type=application/x-www-form-urlencoded}  
],  
body=code=[authCode]&redirect\_uri=[myRedirectURI]&grant\_type=authorization\_code  
}

This is one example of the response I’m getting back

```auto
< HTTP/2 200
< date: Fri, 18 Jun 2021 20:20:15 GMT
< content-length: 0
< x-zm-trackingid: WEB_ea696e374c001775a2b99c3272baa550
< x-content-type-options: nosniff
< content-security-policy: upgrade-insecure-requests; default-src https://*.zoom.us https://zoom.us blob: 'self'; img-src https: about: blob: data: 'self'; style-src https: safari-extension: chrome-extension: 'unsafe-inline' data: 'self'; font-src https: safari-extension: chrome-extension: blob: data: 'self'; connect-src * about: blob: data: 'self'; media-src * rtmp: blob: data: 'self'; frame-src https: ms-appx-web: zoommtg: zoomus: wvjbscheme: data: 'self'; object-src 'none'; base-uri 'none';
< x-frame-options: SAMEORIGIN
< set-cookie: zm_aid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
< set-cookie: zm_haid=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
< set-cookie: web_zak=""; Domain=.zoom.us; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
< p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"
< set-cookie: _zm_ssid=aw1_c_19-PLYTgRwiGG75S5wAqvA; Domain=.zoom.us; Path=/; Secure; HttpOnly
< strict-transport-security: max-age=31536000; includeSubDomains
< x-xss-protection: 1; mode=block
< referrer-policy: strict-origin-when-cross-origin
<

```

**Additional context**  
I’ve tried just about everything I can think of to try and make this request work, but the API refuses to give me either an error code or any response body back so I’m really not sure what else I should be trying.

---

<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:** [June 22, 2021, 3:49pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/2 "2021-06-22T15:49:17Z")

</div>

Hi @cstout,

Happy to help—what is your preferred language for making this request? I’m happy to see if I can provide you with an example.

In the meantime, here is a request that should work in HTTP:

```auto
POST /oauth/token?grant_type=authorization_code&code={code}&redirect_uri=https://zoom.us HTTP/1.1
Host: zoom.us
Authorization: Basic {base64encoded ID:Secret}

```

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![cstout](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cstout/32/28413_2.png) [@cstout](https://devforum.zoom.us/u/cstout)\
**Post date:** [June 22, 2021, 4:02pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/4 "2021-06-22T16:02:03Z")

</div>

Hi @will.zoom, sorry if this gets posted twice, looks like my original reply might have been moderated?

It looks like in your example you’re passing query params, but the docs indicate those should be a body that is `application/x-www-form-urlencoded`. Will either work?

The server is written in java, here is a snippet of what the request looks like. See if anything looks off to you. Thanks so much for your help!

```auto
   basicZoomAuth =
      Base64
        .getEncoder()
        .encodeToString(
          String.format("%s:%s", zoomClientId.get(), zoomClientSecret.get()).getBytes()
        );
   HttpRequest getTokenRequest = HttpRequest
      .newBuilder()
      .setUri("https://api.zoom.us/oauth/token")
      .setMethod(POST)
      .addHeader("Authorization", "Basic " + basicZoomAuth)
      .addBodyParam("code", authCode)
      .addBodyParam("redirect_uri", REDIRECT_URI)
      .addBodyParam("grant_type", "authorization_code")
      .addHeader("Content-Type", "application/x-www-form-urlencoded")
      .build();

```

---

<div class="post-metadata">

**Author:** ![cstout](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cstout/32/28413_2.png) [@cstout](https://devforum.zoom.us/u/cstout)\
**Post date:** [June 22, 2021, 8:28pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/5 "2021-06-22T20:28:24Z")

</div>

Just to follow up, I have tried the request as you’ve pasted here and I’m still seeing the same behavior. Some clarification:

- The redirect\_uri parameter should be _my_ redirect uri that I have defined for my application correct? Not the [zoom.us](http://zoom.us) url you have listed
- Is the expected behavior of the API that if an error is encountered I’ll get a 200 response with no body? Why am I not getting an error code in the response or some non 200 http response code?

---

<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:** [June 23, 2021, 5:42pm UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/6 "2021-06-23T17:42:00Z")

</div>

Hey @cstout,

Thanks for clarifying.

First, regarding:

> - The redirect\_uri parameter should be _my_ redirect uri that I have defined for my application correct? Not the [zoom.us](http://zoom.us/) url you have listed

That’s right—I’m just using this as an example.

As for:

> - Is the expected behavior of the API that if an error is encountered I’ll get a 200 response with no body? Why am I not getting an error code in the response or some non 200 http response code?

This means something is likely still off with your request.

Have you tried sending this request in Postman, cURL, etc. to see if you run into the same issue?

Let me know, thanks!  
Will

---

<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:** [July 24, 2021, 3:42am UTC](https://devforum.zoom.us/t/zoom-oauth-endpoint-returning-no-data/52746/7 "2021-07-24T03:42:26Z")

</div>

Closed on July 24, 2021, 3:42am UTC

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