# Oauth token request response 23: Data required

**URL:** <https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146>\
**Category:** Authentication\
**Created:** [March 3, 2023, 10:12pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146 "2023-03-03T22:12:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![henry.kyburg](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@henry.kyburg](https://devforum.zoom.us/u/henry.kyburg)\
**Post date:** [March 3, 2023, 10:12pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/1 "2023-03-03T22:12:02Z")

</div>

**Description**  
Unable to retrieve token in Qsys/LUA.  
The code works in Postman, but not in the LUA implementation used by Q-SYS.  
I’m using the Server-to-Server Oauth App.

When I try to get a token in the LUA code, I get a message in red : “23: Data required”.  
Line 23 is the HttpClient.Upload command.

Does this indicates that [zoom.us/oauth](http://zoom.us/oauth) is requiring more info from my Q-SYS device’s request ?

Here’s the code, (with my base64 username encode removed):

HttpClient.Upload  
{  
Url = “[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id=iN67vHr6Q-K47u0uVDgoAw](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=iN67vHr6Q-K47u0uVDgoAw)”,  
Method = “POST”,

Headers = {  
Authorization = “Basic _base64 encoded username:password_”,  
Content\_Type = “application/json”,  
Accept = “_/_”,  
Accept\_Encoding = “gzip, deflate, br”,  
Connection = “keep-alive”,

},  
EventHandler = done4  
}  
end

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 6, 2023, 4:08am UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/2 "2023-03-06T04:08:34Z")

</div>

> [@henry.kyburg](#):
>
> The code works in Postman, but not in the LUA implementation used by Q-SYS.  
> I’m using the Server-to-Server Oauth App.

If it works in Postman there may be something with the configuration in that system. Is there support available on their end? I’m not familiar.

---

<div class="post-metadata">

**Author:** ![henry.kyburg](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@henry.kyburg](https://devforum.zoom.us/u/henry.kyburg)\
**Post date:** [March 6, 2023, 5:06pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/4 "2023-03-06T17:06:48Z")

</div>

In the same Qsys Design file, I have good control REST control of another 3rd party device, which I had tested in Postman and implemented in Qsys/ LUA with no issues.

Qsys tech support says ZOOM must be requesting info that I am not providing, but I don’t see any reference to any other parameters or headers that I am missing. Can you confirm exactly which data must be supplied for a successful POST request to ZOOM ? thanks!

---

<div class="post-metadata">

**Author:** ![henry.kyburg](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@henry.kyburg](https://devforum.zoom.us/u/henry.kyburg)\
**Post date:** [March 8, 2023, 4:17pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/5 "2023-03-08T16:17:47Z")

</div>

So exactly which data does Zoom require for a successful token request? thanks!  
-Henry

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 8, 2023, 6:57pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/6 "2023-03-08T18:57:59Z")

</div>

> [@henry.kyburg](#):
>
> The code works in Postman, but not in the LUA implementation used by Q-SYS.  
> I’m using the Server-to-Server Oauth App.

Can you please share screenshots of your Postman set up since it is successful? Are you using our public [workspace](https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/request/22097587-875f65b4-d88f-4082-80af-7605303a5abc?ctx=documentation)?

I overlooked this before, but modify your Headers. It should be

`Host: zoom.us`  
`Authorization: Basic [Client_ID:ClientSecret]`

You were missing the `Host` field. You don’t need content\_type since we have query parameters in the URL for Server-to-Server OAuth.

Testing in Postman, when I have the `Host` header removed, I get bad request:

 ![Screenshot 2023-03-08 at 10.52.16 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/6/c6eb61b13463ba73589a8a4e5bd2daa38c230cc1.png)

With host selected, I yield a successful response with token:

 ![Screenshot 2023-03-08 at 10.55.40 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/5/85ab61a5e6ad9bb7fb98b3f2fc15d790f06db3f6.png)

Let me know if that works!

---

<div class="post-metadata">

**Author:** ![henry.kyburg](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@henry.kyburg](https://devforum.zoom.us/u/henry.kyburg)\
**Post date:** [March 8, 2023, 9:26pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/7 "2023-03-08T21:26:11Z")

</div>

_Redacted_

Above is a screen shot of the working Postman session. notice some headers are calculated when request is sent.

Here is a screenshot of the LUA code ( I do have the host header in there. I’ve tried this many different ways. Notice that I’m using server -to-server oauth.

_Redacted_

Can you please confirm exactly what headers are required to request an Oauth token? I’ve read every zoom publication and watched every youtube vid I can find. They all show how to make postman retrieve a token, but clearly Postman is supplying some “data” that I am missing when moving the request over to LUA. I have successfully implemented POST requests in LUA, but with this ZOOM Oauth request, I’m stuck. thanks, Henry

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 10, 2023, 11:53pm UTC](https://devforum.zoom.us/t/oauth-token-request-response-23-data-required/84146/8 "2023-03-10T23:53:03Z")

</div>

Hi @henry.kyburg , I had to redact your post as we should share sensitive info like account id and tokens on a public forum.

What I did notice about your request in LUA is the Postman token on line 39. Why is this included in the LUA request? You should not transfer Postman specific request details to the other platform.

Here are some more code samples for making the POST request via terminal command line or javascript:

[https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token)

> **[GitHub - zoom/server-to-server-oauth-token: Utility script to generate a Zoom...](https://github.com/zoom/Server-to-Server-Oauth-Token)**
>
> Utility script to generate a Zoom Server-to-Server Oauth Token and copy to clipboard - GitHub - zoom/server-to-server-oauth-token: Utility script to generate a Zoom Server-to-Server Oauth Token and...
