# Server To Server OAuth - 401 Unauthorized returned

**URL:** <https://devforum.zoom.us/t/server-to-server-oauth-401-unauthorized-returned/95834>\
**Category:** API and Webhooks\
**Tags:** s2s-oauth\
**Created:** [September 26, 2023, 5:13pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-401-unauthorized-returned/95834 "2023-09-26T17:13:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmcdaniel](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@cmcdaniel](https://devforum.zoom.us/u/cmcdaniel)\
**Post date:** [September 26, 2023, 5:13pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-401-unauthorized-returned/95834/1 "2023-09-26T17:13:18Z")

</div>

We are authenticating and receiving a token. However, in our C# Rest API. We to use client\_credentials as Grant Type for it to return the token from the app.  
Can you confirm if this is correct?  
It seems like client\_credentials is correct from the app

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/f/2f83bac2c3b9d7f19d4e5ec71f80b8d438d0f093.png)

When we try to hit the endpoint to make a registration to a meeting, we continually get a 401 Unauthorized.  
“[https://api.zoom.us/v2/meetings/{meetingID}/registrants](https://api.zoom.us/v2/meetings/%7BmeetingID%7D/registrants)”

Any guidance appreciated!

Code:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/0/a07d1cd465d6456e36d93478b83f66ffc5f9c776.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/2/120920761a92102b09d958306e2d62a5c20b9088.png)

---

<div class="post-metadata">

**Author:** ![cmcdaniel](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@cmcdaniel](https://devforum.zoom.us/u/cmcdaniel)\
**Post date:** [September 27, 2023, 3:19pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-401-unauthorized-returned/95834/2 "2023-09-27T15:19:49Z")

</div>

This is resolved for us.  
The app must have account\_credentials. It will return a token with client\_credentials, however, you will not be able to hit any endpoints.

---

<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:** [September 28, 2023, 3:20pm UTC](https://devforum.zoom.us/t/server-to-server-oauth-401-unauthorized-returned/95834/3 "2023-09-28T15:20:08Z")

</div>

Closed on September 28, 2023, 3:20pm UTC

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