Skip to content

fix(api-authorization-docs): removed hardcoded API authorization tokens, added more steps to make the token generation easier #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/guides/capabilities/polls/getting_started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,16 @@ meeting.polls.create(

You can also create a poll using the [Create a Poll](/api#/operations/CreatePoll) REST API. This can be used to create a new poll in an active meeting session. In the request, make sure to provide the meeting ID of the session.

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).

#### Request

Here is a sample request, make sure to replace the meeting ID and the authorization header with your own.

```bash
curl --request POST \
--url https://api.dyte.io/v2/meetings/meeting_id/active-session/poll \
--header 'Authorization: Basic undefined' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"question": "string",
Expand Down
6 changes: 5 additions & 1 deletion docs/guides/capabilities/recording/custom-cloud-storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ precedence and override the storage details configured in the Developer Portal.

:::

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).


### Using the `storage_config` option in the Start Recording API

Expand All @@ -59,7 +61,7 @@ storage_config for a specific
```bash
curl --request POST \
--url https://api.dyte.io/v2/recordings \
--header 'Authorization: Basic NzBjNWQzOTEtNGJhYy00Y2YzLTk5MDctYmVjMjA1Nzk4YWRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a",
Expand All @@ -74,6 +76,8 @@ curl --request POST \
}'
```

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).


## Supported Cloud Providers

Expand Down
6 changes: 4 additions & 2 deletions docs/guides/capabilities/recording/start-recording.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This topic explains how to use Dyte to implement composite recording.
Before getting started with this guide, we recommend that you read
[Getting Started with Dyte](/getting-started) to familiarize yourself with Dyte.

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).

There are three ways to start recording a Dyte meeting:

- Using the `record_on_start` flag when
Expand Down Expand Up @@ -55,7 +57,7 @@ participant joins the meeting.
```bash
curl --request POST \
--url https://api.dyte.io/v2/meetings \
--header 'Authorization: Basic NzcyNDMyYXNoZGphZDpkc2ZzZGFmc2FkZmFzZGZzZGY=' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "Lorem Ipsum",
Expand Down Expand Up @@ -96,7 +98,7 @@ meeting ID.
```bash title="Calling Start Recording API"
curl --request POST \
--url https://api.dyte.io/v2/recordings \
--header 'Authorization: Basic NzcyNDMyYXNoZGphZDpkc2ZzZGFmc2FkZmFzZGZzZGY=' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a"
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/capabilities/webhooks/webhooks-and-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ to receive all events, you can make a request like:

```bash
curl --location --request POST 'https://api.dyte.io/v2/webhooks' \
--header 'Authorization: Basic WRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "All events webhook",
Expand All @@ -80,6 +80,8 @@ curl --location --request POST 'https://api.dyte.io/v2/webhooks' \
For more information, check out the
[webhooks API reference](/api/?v=v2#/operations/addWebhook).

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).

#### Check for `dyte-uuid` Header

Each webhook will have a unique value for the `dyte-uuid` header. You can use
Expand Down
6 changes: 4 additions & 2 deletions docs/guides/livestream/advanced/livestream-any-rtmp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ simple steps.

Login to the [Developer Portal](https://dev.dyte.io/) and create an account. Copy the [API Keys](https://dev.dyte.io/apikeys) for your organization from the Developer portal. These API Keys are unique to your organization and are required to use Dyte REST APIs such as when instantiating a meeting.

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).

## Step 2: Generate credentials for a livestream

This step generates credentials and ingest URLs for the livestream.
Expand All @@ -26,7 +28,7 @@ This step generates credentials and ingest URLs for the livestream.
```bash
curl --location --request POST 'https://api.dyte.io/v2/livestreams' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ZGVtbzpwQDU1dzByZA==' \
--header 'Authorization: Basic <api_authorization_token>' \
--data-raw '{
"name": "test_livestream"
}'
Expand Down Expand Up @@ -87,7 +89,7 @@ This request returns the `ingest_seconds`, `viewer_seconds`, `ingest_server`,
```bash
curl --location \
--request GET 'https://api.dyte.io/v2/livestreams/9fb22eea-3392-42ad-b884-1129a4f517d2' \
--header 'Authorization: Basic ZGVtbzpwQDU1dzByZA=='
--header 'Authorization: Basic <api_authorization_token>'
```

:::info note
Expand Down
8 changes: 5 additions & 3 deletions docs/guides/rest-apis/livestream-dyte-meeting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ To start livestreaming a meeting, do the following:

Login to the [Developer Portal](https://dev.dyte.io/) and create an account. Copy the [API Keys](https://dev.dyte.io/apikeys) for your organization from the Developer portal. These API Keys are unique to your organization and are required to use Dyte REST APIs such as when instantiating a meeting.

To familiarize yourself with the Dyte REST APIs, we recommend exploring the [Dyte REST API Quickstart Guide](https://docs.dyte.io/guides/rest-apis/quickstart).

### Step 2: Create a live stream

To start live streaming, specify the `meeting ID` of the meeting that you want to live stream. You can obtain the meeting ID by doing the following:
Expand All @@ -44,7 +46,7 @@ In the [Start livestreaming a meeting](/api#/paths/meetings-meeting_id--livestre
```
curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/livestreams \
--header 'Authorization: Basic <token>' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json'
```

Expand Down Expand Up @@ -80,7 +82,7 @@ get the **meeting ID**. The API returns a parameter called `id`, which is your
```bash
curl --request GET \
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/active-livestream \
--header 'Authorization: Basic <token>' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json'
```

Expand Down Expand Up @@ -118,7 +120,7 @@ get the **meeting ID**. The API returns a parameter called `id`, which is your
```bash
curl --request POST \
--url https://api.cluster.dyte.in/v2/meetings/meetingId/active-livestream/stop \
--header 'Authorization: Basic <token>' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json'
```

Expand Down
15 changes: 9 additions & 6 deletions docs/guides/rest-apis/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ that contains the word Basic followed by a space and a base64-encoded string
For example, `Authorization: Basic ZGVtbzpwQDU1dzByZA==`

1. First, register on our [Developer Portal](https://dev.dyte.io).
2. Copy the API Key for your organization. This API Key is unique to your
2. Go to [API Keys section](https://dev.dyte.io/apikeys).
3. Copy the API Key for your organization. This API Key is unique to your
organization. The organization ID acts as the username, and the API Key is
your password.

You can quickly generate a base64-encoded `api_authorization_token` using `window.btoa('YOUR_ORG_ID:YOUR_API_KEY')` in the browser console."

### Step 3: Create Presets

[Create presets](https://dev.dyte.io/roles-presets) using the Developer portal.
Expand Down Expand Up @@ -82,7 +85,7 @@ meeting ID is required for subsequent operations like adding participants.
```bash
curl --request POST \
--url https://api.dyte.io/v2/meetings \
--header 'Authorization: Basic ZGV2QGR5dGUuaW46MTIzNDU2Nzg5YXNkaGZnaGo=' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"title": "Sample meeting",
Expand Down Expand Up @@ -124,7 +127,7 @@ The preset name created earlier must be passed in the request.
```bash
curl --request POST \
--url https://api.dyte.io/v2/meetings/<meetingId>/participants \
--header 'Authorization: Basic ZGV2QGR5dGUuaW46MTIzNDU2Nzg5YXNkaGZnaGo=' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Mary Sue",
Expand Down Expand Up @@ -169,7 +172,7 @@ configuration, the recording will be stored in your S3 bucket as well.
```bash
curl --request POST \
--url https://api.dyte.io/v2/recordings \
--header 'Authorization: Basic MzkwYmYyNzQtNDEzMy00MjZkLTg0OTEtZWE3YTFhMTkwNDhiOjdmYTQzNjAwZjk3ZTVkZGI5NmIw' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a",
Expand Down Expand Up @@ -218,7 +221,7 @@ curl --request POST \
```bash
curl --request PUT \
--url https://api.staging.dyte.in/v2/recordings/<recordingId> \
--header 'Authorization: Basic NzBjNWQzOTEtNGJhYy00Y2YzLTk5MDctYmVjMjA1Nzk4YWRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"action": "stop"
Expand Down Expand Up @@ -287,7 +290,7 @@ send the event.
```bash
curl --request POST \
--url https://api.dyte.io/v2/webhooks \
--header 'Authorization: Basic NzBjNWQzOTEtNGJhYy00Y2YzLTk5MDctYmVjMjA1Nzk4YWRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
--header 'Authorization: Basic <api_authorization_token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Attendance",
Expand Down
Loading