Skip to content

Commit 5a0a588

Browse files
docs(realtimekit): fixed incorrect replacements and links
1 parent 72639b6 commit 5a0a588

File tree

1 file changed

+53
-38
lines changed

1 file changed

+53
-38
lines changed

src/content/docs/realtime/realtimekit/getting-started.mdx

Lines changed: 53 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ sidebar:
66
---
77
import { Tabs, TabItem, Steps, Render } from '~/components';
88

9-
:::note[Before you get started with RealtimeKit:]
10-
11-
If you don't have a Cloudflare Account, [please create one](/fundamentals/account/create-account/).
12-
13-
:::
14-
15-
### Understanding the RealtimeKit SDK Model
9+
### Understanding the RealtimeKit SDK model
1610

1711
Before we get started with RealtimeKit, let's understand the SDK model.
1812

@@ -43,7 +37,7 @@ To put this model into practice, you’ll follow these steps:
4337
5. **Initialize the SDK** using the participant’s auth token.
4438
6. **Join the session as a peer**—enabling real-time interaction with others in the meeting.
4539

46-
### Create Cloudflare API access Token with Realtime Permissions
40+
### Create a Cloudflare API token with Realtime permissions
4741

4842
To integrate RealtimeKit in your application, you must have a Cloudflare API token with **Realtime** access permissions. To create an API token:
4943

@@ -55,79 +49,78 @@ Alternatively, you can [create tokens programmatically via the API](/fundamental
5549

5650
Make sure to select the Realtime product with Admin access.
5751

58-
![Realtime permission token section](~/assets/images/realtime/realtimekit/permission-token-section.png).
52+
![Screenshot showing the Realtime permission token section in the Cloudflare dashboard](~/assets/images/realtime/realtimekit/permission-token-section.png)
5953

60-
If done right, following CURL should give you the list of you existing apps with 200 status code. If you have no apps, it will return an empty array with 200 status code.
54+
If you run the following command and your setup is correct, you should receive a list of your existing Cloudflare RealtimeKit apps and a 200 status code. If you have no apps, the response will be an empty array with a 200 status code.
6155

6256
```bash
63-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/apps' \
57+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/apps' \
6458
--header 'Authorization: Bearer <api_token>'
6559
```
6660

67-
If the above API doesn't give you 200 status code, it means you don't have the right permissions or the API token is not valid.
61+
If you do not receive a 200 status code, check your permissions or verify that your API token is valid.
6862

69-
You can also view and manage your apps directly in the [Cloudflare RealtimeKit dashboard](https://dash.cloudflare.com/?to=/:account/realtime/realtimekit/kit).
63+
You can also view and manage your apps directly in the [Cloudflare RealtimeKit dashboard](https://dash.cloudflare.com/?to=/:account/realtime/kit).
7064

71-
### Create RealtimeKit App
65+
### Create a Cloudflare RealtimeKit app
7266

7367
Once you have your API token ready, the next step is to create a RealtimeKit app.
74-
You can use our [API reference](/api/resources/realtime/realtimekit/) for details on creating an app, or use the following sample cURL command:
68+
You can use our [API reference](/api/resources/realtime/realtimekit/) for details on creating an app, or use the following sample request:
7569

7670
```bash
77-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/apps' \
71+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/apps' \
7872
--header 'Content-Type: application/json' \
7973
--header 'Authorization: Bearer <api_token>' \
8074
--data '{
81-
"name": "My First RealtimeKit App"
75+
"name": "My First Cloudflare RealtimeKit app"
8276
}'
8377
```
8478

8579
For more about apps and their role, see the [RealtimeKit Concepts guide](/realtime/realtimekit/concepts).
8680

87-
### Sandbox vs Production App
81+
### Sandbox vs. production app
8882

8983
It’s best practice to create separate apps for your production and staging environments. This helps you test changes safely without impacting your live environment.
9084

9185
For example, you might name your staging app as `<company_name> - <product_name> - staging` and your production app as `<company_name> - <product_name> - production`.
9286
You are free to choose any app name that fits your workflow.
9387

94-
### Create Meeting
88+
### Create a meeting
9589

96-
After creating an app, you can create a new meeting.
97-
Refer to the [API reference](/api/resources/realtime/realtimekit/) for endpoint details.
90+
After creating your app, create a new meeting using the API:
9891

9992
```bash
100-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/<app_id>/meetings' \
93+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings' \
10194
--header 'Content-Type: application/json' \
10295
--header 'Authorization: Bearer <api_token>' \
10396
--data '{
104-
"title": "My First RealtimeKit Meeting",
97+
"title": "My First Cloudflare RealtimeKit meeting"
10598
}'
10699
```
107100

108-
To verify your meeting, you can list all meetings for your app:
101+
To verify your meeting, list all meetings for your app:
109102

110103
```bash
111-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/<app_id>/meetings' \
104+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings' \
112105
--header 'Authorization: Bearer <api_token>'
113106
```
114107

115108
Be sure to keep the ID of your newly created meeting for the next steps.
116109

117-
### Create a Preset for a Participant
110+
### Create a preset for a participant
118111

119112
Before adding participants, you need to decide what permissions they should have.
120113
Presets define these permissions, and RealtimeKit provides some default presets to get you started.
121114
Learn more about presets in the [Concepts guide](/realtime/realtimekit/concepts#presets).
122115

123-
To see existing presets, use:
116+
To see existing presets, run:
124117

125118
```bash
126-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/<app_id>/presets' \
119+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/presets' \
127120
--header 'Authorization: Bearer <api_token>'
128121
```
129122

130-
You can create new presets using the [API reference](/api/resources/realtime/realtimekit/) or via the [RealtimeKit dashboard](https://dash.cloudflare.com/?to=/:account/realtime/realtimekit/kit).
123+
You can create new presets using the [API reference](/api/resources/realtime/realtimekit/) or via the [RealtimeKit dashboard](https://dash.cloudflare.com/?to=/:account/realtime/kit).
131124

132125
Keep the preset name handy for the next step.
133126

@@ -137,13 +130,12 @@ Keep the preset name handy for the next step.
137130
This means you can define a role (such as "teacher" or "viewer") once and assign it to participants in any number of meetings, ensuring consistent permissions and experience. For example, the same `teacher` preset can be used for all classrooms, so you don’t have to redefine permissions every time you create a new meeting. This streamlines setup and helps maintain standardized roles across your organization.
138131
:::
139132

140-
### Add Participant
133+
### Add a participant
141134

142-
With your meeting and preset ready, you can now add a participant.
143-
Replace all placeholder values in the following cURL command with your actual data.
135+
With your meeting and preset ready, add a participant using the following command. Replace all placeholder values with your actual data:
144136

145137
```bash
146-
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/realtimekit/kit/<app_id>/meetings/<meeting_id>/participants' \
138+
curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings/<meeting_id>/participants' \
147139
--header 'Content-Type: application/json' \
148140
--header 'Authorization: Bearer <api_token>' \
149141
--data '{
@@ -161,19 +153,42 @@ curl --location 'https://api.cloudflare.com/client/v4/accounts/<account_id>/real
161153
The response will include an auth token, which is required for the participant to join the meeting.
162154
See the [API reference](/api/resources/realtime/realtimekit/) for more details on participant management.
163155

164-
### Try the RealtimeKit Sample UI with Participant Auth Token
156+
### Try the sample UI with your participant auth token
165157

166-
Now that you have the auth token, you can try out the default UI samples for different platforms. Choose your platform below:
158+
After you receive the auth token, try the default UI samples for your platform:
167159

168160
<Tabs>
161+
<TabItem label="Web Components">
162+
163+
**Run the default-meeting-ui sample ([GitHub repo](https://github.com/dyte-io/html-samples/tree/main/samples/default-meeting-ui))**
164+
165+
1. Clone the sample:
166+
```bash
167+
git clone https://github.com/dyte-io/html-samples.git
168+
cd html-samples/samples/default-meeting-ui
169+
```
170+
2. Install dependencies:
171+
```bash
172+
npm install
173+
```
174+
3. Start the development server:
175+
```bash
176+
npm start
177+
```
178+
4. Open the app in your browser. To join the session, **append your auth token to the preview URL**:
179+
```
180+
http://localhost:5173/?authToken=<participant_auth_token>
181+
```
182+
Replace `<participant_auth_token>` with the token you received from the Add Participant API.
183+
</TabItem>
169184
<TabItem label="React">
170185

171-
**Run the default-meeting-ui sample ([GitHub repo](https://github.com/dyte-io/react-samples/tree/main/default-meeting-ui))**
186+
**Run the default-meeting-ui sample ([GitHub repo](https://github.com/dyte-io/react-samples/tree/main/samples/default-meeting-ui))**
172187

173188
1. Clone the sample:
174189
```bash
175190
git clone https://github.com/dyte-io/react-samples.git
176-
cd react-samples/default-meeting-ui
191+
cd react-samples/samples/default-meeting-ui
177192
```
178193
2. Install dependencies:
179194
```bash
@@ -185,7 +200,7 @@ Now that you have the auth token, you can try out the default UI samples for dif
185200
```
186201
4. Open the app in your browser. To join the session, **append your auth token to the preview URL**:
187202
```
188-
http://localhost:3000/?authToken=<participant_auth_token>
203+
http://localhost:5173/?authToken=<participant_auth_token>
189204
```
190205
Replace `<participant_auth_token>` with the token you received from the Add Participant API.
191206
</TabItem>

0 commit comments

Comments
 (0)