# Managing Resources for Users (Clinicians, Zoom Type 1 - Basic Users)

**URL:** <https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [August 13, 2024, 3:25pm UTC](https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588 "2024-08-13T15:25:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anurag2](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anurag2](https://devforum.zoom.us/u/anurag2)\
**Post date:** [August 13, 2024, 3:25pm UTC](https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588/1 "2024-08-13T15:25:05Z")

</div>

### Context

As an Admin, I’m responsible for managing various resources for our users (clinicians who are Zoom Type 1 - basic users). The resources we need to perform CRUD operations on include:

- **Users**
- **Groups**
- **Memberships** (relationships between users and groups)
- **Meetings**
- **Availability**

### Challenges & Questions

#### APIs Without `userId` Parameter:

- **Observation:** Some APIs, like `POST /users/:userId`, allow specifying the user directly using the `:userId` parameter, and they work as expected.
- **Issue:** Other APIs, such as `POST /scheduler/availability/:availabilityId`, do not have a `userId` attribute or parameter to specify the user context.
- **Question:** How can we manage user-specific resources using these APIs that lack a direct `userId` parameter?

#### Using User Tokens:

- **Attempted Solution:** I considered invoking the API using the user’s token directly. I obtained this token via the Zoom User Token API.
- **Problem Encountered:** When using the retrieved token as a Bearer token in the API call, I received an “Invalid Token” error.
- **Specific Question:** How does the token returned by the Zoom User Token API function? Is there a specific method or context in which this token should be used to authenticate API requests successfully?

### Request for Assistance

I’m seeking guidance on:

- Properly managing resources for users via Zoom APIs that don’t explicitly accept a `userId`.
- Understanding the correct usage of tokens obtained from the Zoom User Token API to authenticate and authorize API requests.

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [August 14, 2024, 11:49pm UTC](https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588/2 "2024-08-14T23:49:27Z")

</div>

Hi @anurag2, welcome and thanks for posting 🙂

I see how the usage of userID in the Users & Meetings APIs doesn’t match the pattern in the Scheduler APIs. This may take some adjustment to track the assignment of availabilityID to the user it was returned for.

> [@anurag2](#):
>
> How can we manage user-specific resources using these APIs that lack a direct `userId` parameter?

My suggestion is to use the `user_id` query parameter in a `GET` request to `/scheduler/availability` ([reference](https://developers.zoom.us/docs/api/rest/reference/zoom-scheduler/methods/#operation/list_availability)). This will return a list of the user’s available schedules.

Request: `GET` `/scheduler/availability?user_id=x3h1u4id4liffdyszsp8kpxl80@scheduler.zoom.us`

```json
{
  "next_page_token": "Cj8KLwotCgsI3ujvqgYQgIXUGxIeChwKGjBzNzAyZWVtbjBzOTdlZXFhNXE1NWg4ZWJtGgwIzIPVrAYQwM3WrAPAPgE=",
  "items": [
    {
      "availability_id": "x3h1u4id4liffdyszsp8kpxl80", // can be used in /scheduler/availability/{availabilityId}
      "default": true,
      "name": "Working hours",
      "owner": "easonfsxsysks3lgchitiw@scheudler.zoom.us",
      "segments_recurrence": {} // [...]
    }
}

```

If you would like to then [query a specific availabilityID](https://developers.zoom.us/docs/api/rest/reference/zoom-scheduler/methods/#operation/get_availability), you may need to associate availabilityIDs with the userID (or email) returned in the list request.

> [@anurag2](#):
>
> How does the token returned by the Zoom User Token API function?

This token is used by the Meeting SDK to authenticate a user into a meeting. The Meeting SDK allows applications to embed Meetings, but might not be what you are looking for here.

My suggestion is to use [server-to-server OAuth](https://developers.zoom.us/docs/internal-apps/s2s-oauth/) as the admin of the account to get an access token that can make requests across all users on the account.

---

<div class="post-metadata">

**Author:** ![anurag2](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anurag2](https://devforum.zoom.us/u/anurag2)\
**Post date:** [August 15, 2024, 5:36pm UTC](https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588/3 "2024-08-15T17:36:58Z")

</div>

Thanks @michael.zoom for the response. We are currently using server to server oAuth.

Is there a way to create or update availability for user as admin? The docs assume that it’s updating availability to whoever the call is. Can you specify which API we need to hit?

---

<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 16, 2024, 5:37pm UTC](https://devforum.zoom.us/t/managing-resources-for-users-clinicians-zoom-type-1-basic-users/115588/4 "2024-08-16T17:37:56Z")

</div>

Closed on August 16, 2024, 5:37pm UTC

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