Skip to content

Commit 77ae194

Browse files
authored
Merge pull request #418 from dyte-io/fix/api-authorisation-docs
fix(api-authorization-docs): removed hardcoded API authorization tokens, added more steps to make the token generation easier
2 parents 7b2f619 + 6124043 commit 77ae194

File tree

7 files changed

+33
-16
lines changed

7 files changed

+33
-16
lines changed

docs/guides/capabilities/polls/getting_started.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,16 @@ meeting.polls.create(
228228

229229
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.
230230

231+
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).
232+
231233
#### Request
232234

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

235237
```bash
236238
curl --request POST \
237239
--url https://api.dyte.io/v2/meetings/meeting_id/active-session/poll \
238-
--header 'Authorization: Basic undefined' \
240+
--header 'Authorization: Basic <api_authorization_token>' \
239241
--header 'Content-Type: application/json' \
240242
--data '{
241243
"question": "string",

docs/guides/capabilities/recording/custom-cloud-storage.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ precedence and override the storage details configured in the Developer Portal.
4949

5050
:::
5151

52+
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).
53+
5254

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

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

79+
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).
80+
7781

7882
## Supported Cloud Providers
7983

docs/guides/capabilities/recording/start-recording.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This topic explains how to use Dyte to implement composite recording.
1111
Before getting started with this guide, we recommend that you read
1212
[Getting Started with Dyte](/getting-started) to familiarize yourself with Dyte.
1313

14+
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).
15+
1416
There are three ways to start recording a Dyte meeting:
1517

1618
- Using the `record_on_start` flag when
@@ -55,7 +57,7 @@ participant joins the meeting.
5557
```bash
5658
curl --request POST \
5759
--url https://api.dyte.io/v2/meetings \
58-
--header 'Authorization: Basic NzcyNDMyYXNoZGphZDpkc2ZzZGFmc2FkZmFzZGZzZGY=' \
60+
--header 'Authorization: Basic <api_authorization_token>' \
5961
--header 'Content-Type: application/json' \
6062
--data '{
6163
"title": "Lorem Ipsum",
@@ -96,7 +98,7 @@ meeting ID.
9698
```bash title="Calling Start Recording API"
9799
curl --request POST \
98100
--url https://api.dyte.io/v2/recordings \
99-
--header 'Authorization: Basic NzcyNDMyYXNoZGphZDpkc2ZzZGFmc2FkZmFzZGZzZGY=' \
101+
--header 'Authorization: Basic <api_authorization_token>' \
100102
--header 'Content-Type: application/json' \
101103
--data '{
102104
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a"

docs/guides/capabilities/webhooks/webhooks-and-events.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ to receive all events, you can make a request like:
6161

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

83+
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).
84+
8385
#### Check for `dyte-uuid` Header
8486

8587
Each webhook will have a unique value for the `dyte-uuid` header. You can use

docs/guides/livestream/advanced/livestream-any-rtmp.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ simple steps.
1717

1818
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.
1919

20+
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).
21+
2022
## Step 2: Generate credentials for a livestream
2123

2224
This step generates credentials and ingest URLs for the livestream.
@@ -26,7 +28,7 @@ This step generates credentials and ingest URLs for the livestream.
2628
```bash
2729
curl --location --request POST 'https://api.dyte.io/v2/livestreams' \
2830
--header 'Content-Type: application/json' \
29-
--header 'Authorization: Basic ZGVtbzpwQDU1dzByZA==' \
31+
--header 'Authorization: Basic <api_authorization_token>' \
3032
--data-raw '{
3133
"name": "test_livestream"
3234
}'
@@ -87,7 +89,7 @@ This request returns the `ingest_seconds`, `viewer_seconds`, `ingest_server`,
8789
```bash
8890
curl --location \
8991
--request GET 'https://api.dyte.io/v2/livestreams/9fb22eea-3392-42ad-b884-1129a4f517d2' \
90-
--header 'Authorization: Basic ZGVtbzpwQDU1dzByZA=='
92+
--header 'Authorization: Basic <api_authorization_token>'
9193
```
9294

9395
:::info note

docs/guides/rest-apis/livestream-dyte-meeting.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ To start livestreaming a meeting, do the following:
2121

2222
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.
2323

24+
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).
25+
2426
### Step 2: Create a live stream
2527

2628
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:
@@ -44,7 +46,7 @@ In the [Start livestreaming a meeting](/api#/paths/meetings-meeting_id--livestre
4446
```
4547
curl --request POST \
4648
--url https://api.cluster.dyte.in/v2/meetings/{meetingId}/livestreams \
47-
--header 'Authorization: Basic <token>' \
49+
--header 'Authorization: Basic <api_authorization_token>' \
4850
--header 'Content-Type: application/json'
4951
```
5052

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

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

docs/guides/rest-apis/quickstart.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ that contains the word Basic followed by a space and a base64-encoded string
4949
For example, `Authorization: Basic ZGVtbzpwQDU1dzByZA==`
5050

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

57+
You can quickly generate a base64-encoded `api_authorization_token` using `window.btoa('YOUR_ORG_ID:YOUR_API_KEY')` in the browser console."
58+
5659
### Step 3: Create Presets
5760

5861
[Create presets](https://dev.dyte.io/roles-presets) using the Developer portal.
@@ -82,7 +85,7 @@ meeting ID is required for subsequent operations like adding participants.
8285
```bash
8386
curl --request POST \
8487
--url https://api.dyte.io/v2/meetings \
85-
--header 'Authorization: Basic ZGV2QGR5dGUuaW46MTIzNDU2Nzg5YXNkaGZnaGo=' \
88+
--header 'Authorization: Basic <api_authorization_token>' \
8689
--header 'Content-Type: application/json' \
8790
--data '{
8891
"title": "Sample meeting",
@@ -124,7 +127,7 @@ The preset name created earlier must be passed in the request.
124127
```bash
125128
curl --request POST \
126129
--url https://api.dyte.io/v2/meetings/<meetingId>/participants \
127-
--header 'Authorization: Basic ZGV2QGR5dGUuaW46MTIzNDU2Nzg5YXNkaGZnaGo=' \
130+
--header 'Authorization: Basic <api_authorization_token>' \
128131
--header 'Content-Type: application/json' \
129132
--data '{
130133
"name": "Mary Sue",
@@ -169,7 +172,7 @@ configuration, the recording will be stored in your S3 bucket as well.
169172
```bash
170173
curl --request POST \
171174
--url https://api.dyte.io/v2/recordings \
172-
--header 'Authorization: Basic MzkwYmYyNzQtNDEzMy00MjZkLTg0OTEtZWE3YTFhMTkwNDhiOjdmYTQzNjAwZjk3ZTVkZGI5NmIw' \
175+
--header 'Authorization: Basic <api_authorization_token>' \
173176
--header 'Content-Type: application/json' \
174177
--data '{
175178
"meeting_id": "97440c6a-140b-40a9-9499-b23fd7a3868a",
@@ -218,7 +221,7 @@ curl --request POST \
218221
```bash
219222
curl --request PUT \
220223
--url https://api.staging.dyte.in/v2/recordings/<recordingId> \
221-
--header 'Authorization: Basic NzBjNWQzOTEtNGJhYy00Y2YzLTk5MDctYmVjMjA1Nzk4YWRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
224+
--header 'Authorization: Basic <api_authorization_token>' \
222225
--header 'Content-Type: application/json' \
223226
--data '{
224227
"action": "stop"
@@ -287,7 +290,7 @@ send the event.
287290
```bash
288291
curl --request POST \
289292
--url https://api.dyte.io/v2/webhooks \
290-
--header 'Authorization: Basic NzBjNWQzOTEtNGJhYy00Y2YzLTk5MDctYmVjMjA1Nzk4YWRiOmQyNzBmYjJmOGNiNGUzZWY1MGI1' \
293+
--header 'Authorization: Basic <api_authorization_token>' \
291294
--header 'Content-Type: application/json' \
292295
--data '{
293296
"name": "Attendance",

0 commit comments

Comments
 (0)