# Directions regarding handing Zoom Server-to-Server app

**URL:** <https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640>\
**Category:** Meetings\
**Created:** [September 28, 2022, 12:44pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640 "2022-09-28T12:44:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sowmen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sowmen/32/33187_2.png) [@sowmen](https://devforum.zoom.us/u/sowmen)\
**Post date:** [September 28, 2022, 12:44pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/1 "2022-09-28T12:44:06Z")

</div>

Hi there!  
Our web app needs to be able to create and have concurrent meetings. We are planning to use the Server-to-Server OAuth approach. However, we’re having trouble navigating through the API docs and some of the flows for creating users and meetings via the APIs. Our main flow includes inviting users on our web app via email by creating a new Free/Licensed user on our Zoom One Pro account. When their account is verified, our Server-to-Server OAuth app will make API calls to get their user tokens to create meetings and start them.

To test this flow, we tried creating a meeting with the owner / main user’s account (which is a Licensed account), however, when we tried to create an instant meeting with their account, we receive a 404 error with message “Request failed with status code 404”.

Here are the steps we followed:

1. Created a Server-to-Server OAuth app.
2. Collected the Client ID, Client Secret and the Account ID from the app after activating it.
3. Get the user’s access token from POST /oauth/token endpoint using the above three keys
4. Using the access token, hit the endpoint POST /users/{userId}/meetings with the payload given below to create an instant meeting. The userId of the main account owner was passed in the path parameter.

```auto
topic: 'Discussion about something',
agenda: 'Lets discuss',
type: 1,
settings: { 
  host_video: false, 
  participant_video: true
}

```

The response gave us 404. We’re a bit stumped about what’s going wrong and we’d appreciate your help.  
Thank you!

---

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [September 28, 2022, 3:19pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/2 "2022-09-28T15:19:50Z")

</div>

According to the [Create a meeting API](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingCreate), the 404 response status indicates that the user wasn’t found. Can you check whether the user ID you’re using appears in the [List users API](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/users)?

---

<div class="post-metadata">

**Author:** ![sowmen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sowmen/32/33187_2.png) [@sowmen](https://devforum.zoom.us/u/sowmen)\
**Post date:** [September 28, 2022, 4:29pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/3 "2022-09-28T16:29:45Z")

</div>

Hello @MultiplayerSession, yes I checked the List users API, and I indeed found that the user is being returned with the API response, with:

- verified: 1
- type: 2
- status: “active”
- role\_id: “0”

What might be causing the 404 in this case?

---

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [September 28, 2022, 5:08pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/4 "2022-09-28T17:08:58Z")

</div>

Sounds like you were able to get other API responses, so the URL to the API endpoint sounds correct (the token endpoint and all the other API endpoints are on different domains and root subdirectories). I’d check if you’ve granted the `meeting:write:admin` scope and see if there’s anything in the [API Call Logs](https://marketplace.zoom.us/user/logs). There was a recent change to scopes in that the user that owns the app needs at least the same privileges that the app needs (the option to transfer the app to another user disappeared in what I assume is an attempt to help encourage this), and changing the owning user’s role will cause removed scopes to be dropped from the app as well.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 29, 2022, 9:50pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/5 "2022-09-29T21:50:53Z")

</div>

Thank you for your suggestion and insight @MultiplayerSession!

@sowmen Have you verified the correct permission was granted to hit the API endpoint?

---

<div class="post-metadata">

**Author:** ![sowmen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sowmen/32/33187_2.png) [@sowmen](https://devforum.zoom.us/u/sowmen)\
**Post date:** [September 30, 2022, 5:05am UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/6 "2022-09-30T05:05:25Z")

</div>

Hello @donte.zoom, I have verified the scopes have been assigned properly. Before I call the Create meeting API, I request a new access\_token for the admin user, and the `scopes` assigned for this user are:

```auto
token_type: 'bearer',
expires_in: 3599,
scope: 'account:master account:read:admin account:write:admin meeting:master meeting:read:admin meeting:write:admin meeting_token:read:admin:live_streaming user:master user:read:admin user:write:admin'

```

Below is the list of scopes granted by the server-to-server OAuth app:

- `account:master`
- `account:read:admin`
- `account:write:admin`
- `meeting:master`
- `meeting:read:admin`
- `meeting:write:admin`
- `user:master`
- `user:read:admin`
- `user:write:admin`
- `meeting_token:read:admin:live_streaming`

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 30, 2022, 11:19am UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/7 "2022-09-30T11:19:00Z")

</div>

@sowmen,  
It looks like you have the correct permissions. Are you only seeing this behavior when testing with the userId of the main account owner? Just tested on my end and the following payload returned a 201 response:

```auto
{
"topic": "Discussion about something",
"agenda": "Lets discuss",
"type": 1,
"settings": { 
  "host_video": false, 
  "participant_video": true
}
}

```

 ![Screen Shot 2022-09-30 at 7.44.15 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/e/7e10324f63ff0959e59d9e90c046476cd26c031d.png)

What happens if you test with another user in your account?

---

<div class="post-metadata">

**Author:** ![sowmen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sowmen/32/33187_2.png) [@sowmen](https://devforum.zoom.us/u/sowmen)\
**Post date:** [September 30, 2022, 2:53pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/8 "2022-09-30T14:53:29Z")

</div>

Hi @donte.zoom @MultiplayerSession the issue has been resolved and the APIs are all working now properly! It turns out my auth header was missing the `Bearer ` keyword before the access token.

Thank you for your support!

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 30, 2022, 3:43pm UTC](https://devforum.zoom.us/t/directions-regarding-handing-zoom-server-to-server-app/76640/9 "2022-09-30T15:43:34Z")

</div>

Wonderful @sowmen! Glad to hear the issue is now resolved – happy coding!
