# 401 error when adding webinar registrant, when using access token created from Server-to-Server oAuth

**URL:** <https://devforum.zoom.us/t/401-error-when-adding-webinar-registrant-when-using-access-token-created-from-server-to-server-oauth/92806>\
**Category:** API and Webhooks\
**Created:** [August 2, 2023, 11:37am UTC](https://devforum.zoom.us/t/401-error-when-adding-webinar-registrant-when-using-access-token-created-from-server-to-server-oauth/92806 "2023-08-02T11:37:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew.walsh](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@matthew.walsh](https://devforum.zoom.us/u/matthew.walsh)\
**Post date:** [August 2, 2023, 11:37am UTC](https://devforum.zoom.us/t/401-error-when-adding-webinar-registrant-when-using-access-token-created-from-server-to-server-oauth/92806/1 "2023-08-02T11:37:24Z")

</div>

I am able to create an access token, using the server-to-server method.

When I use the token returned from the first call, I am then trying to use it when adding a webinar registrant. I get a 401 “unauthorized” error. I’ll note that the API documentation does not list this as a documented response code? Documented responses are 200, 400, and 404. [Zoom Meeting API](https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/webinarRegistrantCreate)

I have made sure the App has scopes defined in API documentation (webinar: write: admin, webinar: read: admin, users: view and manage)

The call to add the webinar registrant is using webinar ID in resource path (example: base URI & webinars/93388878833/registrants), and passing same values for Host as token call, and Authorization (Bearer {tokenvalue}), with a space character between the string Bearer and the token value, as header values.

I am a little confused by the documentation on this call in [Server-to-Server OAuth](https://developers.zoom.us/docs/internal-apps/s2s-oauth/#make-api-calls-to-zoom-endpoints)  
It says “Use OAuth 2.0 to make API calls to Zoom endpoints” but I don’t understand if this means additional steps beyond the example call that is documented (which isn’t really Oauth2?)

How can I amend my call above to successfully add a webinar registrant?

---

<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:** [August 5, 2024, 3:13am UTC](https://devforum.zoom.us/t/401-error-when-adding-webinar-registrant-when-using-access-token-created-from-server-to-server-oauth/92806/2 "2024-08-05T03:13:44Z")

</div>

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