You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Covers sending test pushes via Ably CLI by client ID and device ID
once the device is activated, before moving on to channel subscriptions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/pages/docs/push/getting-started/nextjs.mdx
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,6 +297,29 @@ npm run dev
297
297
298
298
Navigate to `http://localhost:3000/push` in your browser. Click **Activate Push**, grant notification permission, and wait for the device ID to appear.
299
299
300
+
### Test push notifications <a id="step-3-test"/>
301
+
302
+
Once the device is activated, send a test push notification directly to your client ID using the Ably CLI:
A native browser notification should appear and the log should display the received push event. You can also send to the specific device ID shown in the log:
314
+
315
+
<Code>
316
+
```shell
317
+
ably push publish --device-id <your-device-id> \
318
+
--title "Test push" \
319
+
--body "Hello from CLI!"
320
+
```
321
+
</Code>
322
+
300
323

301
324
302
325
## Step 4: Subscribe to channel push <a id="step-4"/>
0 commit comments