# Make API requests Use your API credentials to authorize requests to the [Account Settings APIs](/docs/api/accounts/#tag/accounts), [Video SDK APIs](/docs/api/video-sdk), [Cobrowse SDK APIs](/docs/api/cobrowse-sdk), and [AI Services](/docs/ai-services/auth/#make-your-first-api-call-jwt). APIs use API keys or [JSON Web Tokens (JWT)](https://datatracker.ietf.org/doc/html/rfc7519) in the request header bearer token for authorization. Get your API key or JWT from Platform Studio. See [get credentials](/docs/build/get-credentials/) for details. ## Make your first API call Here is an example to make your first API call with Video SDK. You can authenticate in the following ways: - Bearer token: `Authorization: Bearer TOKEN` using your API Key or JWT. - Custom header: `x-api-key: ZOOM_API_KEY` using your API Key. _When you send both the `x-api-key` custom header and a Bearer token, the `x-api-key` takes precedence._ ### Authenticate with Bearer token This example calls the [List sessions](/docs/api/video-sdk/#tag/sessions/GET/videosdk/sessions) [Video SDK API](/docs/api/video-sdk) endpoint. synchronous transcription endpoint for the Scribe API. Replace `TOKEN` with your JWT or API Key. ```shell curl https://api.zoom.us/v2/videosdk/sessions -H "Authorization: Bearer TOKEN" -H "Content-Type: application/x-www-form-urlencoded" ``` You should get a response code of `200 OK` and something resembling the response body below. ```json { "from": "2022-09-01", "to": "2022-09-02", "page_size": 30, "next_page_token": "", "sessions": [] } ``` _If you haven't used Video SDK yet to create sessions, the `sessions` object will be blank._ ### Authenticate with Custom header You can also authenticate by adding your API key to the custom `x-api-key` header. ```shell curl https://api.zoom.us/v2/videosdk/sessions -H "x-api-key: ZOOM_API_KEY" -H "Content-Type: application/x-www-form-urlencoded" ``` ## Use Account Settings APIs Use the [Account Settings APIs](/docs/api/accounts/#tag/accounts) to view and modify session and session security information about your account. See [Create account](/docs/build/account/) for details about these settings. See `in_session` and `session_security` objects in the following APIs for reference documentation. - [Get account settings](/docs/api/accounts/#tag/accounts/GET/accounts/{accountId}/settings) - [Update account settings](/docs/api/accounts/#tag/accounts/PATCH/accounts/{accountId}/settings) For example, call [Get account settings](/docs/api/accounts/#tag/accounts/GET/accounts/{accountId}/settings) to see the `data_center_regions` you've enabled for sessions (replace `12345abcde` with your JWT). The [`me` keyword](/docs/api/using-zoom-apis/#the-me-keyword) in this example indicates that you are getting this information for your account. > **Note** > > Some APIs only use JWT or API Key. The API documentation will specify if the API uses JWT only, API Key only, or both. ### Authenticate with Bearer token ```shell curl https://api.zoom.us/v2/accounts/me/settings -H "Authorization: Bearer TOKEN" -H "Content-Type: application/x-www-form-urlencoded" ``` You should get a result that includes something like the following. ```json ... "in_session": { ... "data_center_regions": [ "AU", "CA", "DE", "IE", "IN", "LA", "MX", "NL", "SG", "TY", "US" ], ... ``` _**Note: Some options may only be available for Video SDK.**_ ## Access or modify subaccount data [Master accounts](/docs/api/ma) can use APIs to programmatically manage activities for subaccounts in their organization if both the owner of the master account and the owner of the subaccount agree. _Work with your Zoom account representative to enable this access for the master account and each subaccount._ ### Prerequisites - Verify that the master account and the subaccount are in the same organization. - Verify that Zoom has enabled both of the following permissions: - **Master account permission**: Login access to the subaccount. - **Subaccount permission**: Login access from the master account. ### Access subaccount data > **Note** > > This example uses Video SDK. Use the [Video SDK master account APIs](/docs/api/video-sdk/ma) to access or modify subaccount data. For example, the subaccount endpoint to get a daily usage report is `/videosdk/report/daily`. If you are using the master account and you would like to get the daily usage report for this subaccount, use `/v2/accounts/{accountId}/videosdk/report/daily`. ### To access subaccount data Follow these steps to use the master's API JWT to access the account endpoints for the subaccount and access or modify subaccount data. After authentication, these steps work just as you would use the master account API endpoints in the Zoom Meetings API. 1. Be sure that you meet the [prerequisites](#prerequisites). 2. Use the [list subaccounts endpoint](/docs/api/accounts/ma/#tag/accounts/GET/accounts) to get the account ID for the subaccount. 3. Use the master account [Video SDK API JWT](/docs/build/developer-accounts/#get-sdk-key-and-secret) to [generate an authorization token](/docs/video-sdk/auth/) to access the API. 4. Find the master API endpoint that you want to use, for example, a [Video SDK master account API](/docs/api/video-sdk/ma) or an [Account master API](/docs/api/accounts/ma) such as [get account settings](/docs/api/accounts/ma/#tag/accounts/GET/accounts/{accountId}/settings) for `in_session` objects. 5. Replace `{accountId}` with the account ID for the subaccount. ## Subscribe to webhook events On your [account page](/docs/build/developer-accounts/), under **Add feature**, toggle **Event Subscriptions** to subscribe to events [using webhooks](/docs/api/webhooks/). Configure webhooks to send [Cobrowse SDK events](/docs/api/cobrowse-sdk/events/) or [Video SDK events](/docs/api/video-sdk/events/) to your server as HTTP POST requests. This is useful for tracking events or building out business logic. For example, when you receive a Video SDK session ended webhook, you could send an email to thank the participants for joining.