Skip to content

Commit 3bf6101

Browse files
authored
Merge pull request #29 from photon-hq/spectrum-webhook-dashboard-mention
doc(webhook): reference dashboard for spectrum docs
2 parents eb9a2aa + 385d4dd commit 3bf6101

3 files changed

Lines changed: 22 additions & 6 deletions

File tree

webhooks/managing-webhooks.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ description: Register, list, delete, and rotate webhook signing secrets via the
55

66
By now you can receive deliveries, verify them, and survive retries. This page is the operational layer — how you actually create the webhook records, list them, take one offline, or rotate a leaked secret.
77

8-
There are three HTTP endpoints, all under `https://spectrum.photon.codes/projects/{projectId}/webhooks/`. Every example below uses `curl`, but the same three endpoints are also live in the [interactive API reference](/api-reference/introduction) — paste your project credentials once and run any request from your browser.
8+
There are three HTTP endpoints, all under `https://spectrum.photon.codes/projects/{projectId}/webhooks/`. Every example below uses `curl` to keep things explicit, but the same three operations are available three other ways:
9+
10+
- The **Webhook** tab of your workspace in the [Spectrum dashboard](https://app.photon.codes/dashboard) — a UI any teammate can use.
11+
- The [interactive API reference](/api-reference/introduction) — run any request from your browser with your credentials pre-filled.
12+
- Any HTTP client you like — Postman, Insomnia, your language's SDK, etc.
913

1014
<Tip>
11-
**Read this page first, then hit the API reference.** This page explains *what* each endpoint does and *when* you'd reach for it; the API reference is the interactive playground for actually firing the request. The combo is much faster than reading either alone.
15+
**Read this page for the *what* and *when*, then pick a surface for the *how*.** This page explains what each operation does and when you'd reach for it; the dashboard and API reference are the interactive playgrounds for actually firing the request. The combo is much faster than reading either alone.
1216
</Tip>
1317

1418
## Authentication
@@ -193,7 +197,13 @@ list_webhooks() {
193197

194198
## Working with the dashboard
195199

196-
You can also register, list, and delete webhooks from your project's [dashboard](https://app.photon.codes) under **Settings → Webhooks**. Same operations, no terminal required. The signing secret is shown once at registration time there too — copy it before navigating away.
200+
If you'd rather not touch a terminal, every operation on this page is also a button click away in the [Spectrum dashboard](https://app.photon.codes/dashboard).
201+
202+
Open your workspace and switch to the **Webhook** tab (next to *Platforms*, *Users*, *Lines*, and *Settings*). You'll see:
203+
204+
- A list of every webhook currently registered — endpoint URL plus the date it was added.
205+
- An **+ Add webhook** button to register a new URL. After you click it, the signing secret is shown once in a modal — copy it before closing.
206+
- A **Remove** button next to each row to delete a webhook. Same effect as the `DELETE` endpoint: delivery stops immediately and the signing secret is invalidated.
197207

198208
## Common workflows
199209

webhooks/overview.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A webhook is the inverse of a normal API call.
99

1010
In a normal API call, your code reaches out and asks a service for data — you poll, you wait, you parse the response. In a *web*hook, the service reaches out to *you*: a message arrives, an event fires, and the service `POST`s the details to a URL you've published. You're not asking anymore; you're being told.
1111

12-
For Spectrum, that means you write a regular HTTP handler — in whatever framework you already use — register its URL once, and from then on every inbound message across every enabled platform is delivered as a signed JSON `POST`. No long-lived process to babysit, no platform credentials in your runtime, no reconnect logic.
12+
For Spectrum, that means you write a regular HTTP *handler*a function in your server that runs whenever a request comes in — and register its URL with us once. From then on, every inbound message across every enabled platform is delivered to that URL as a signed JSON `POST`. No long-lived process to babysit, no platform credentials in your runtime, no reconnect logic.
1313

1414
```ts
1515
const app = await Spectrum({ projectId, projectSecret, providers: [imessage.config()] });
@@ -41,7 +41,13 @@ The next six pages build on each other. Skim straight to the topic you need, or
4141
6. **[Troubleshooting](/webhooks/troubleshooting)** — common symptoms, root causes, and fixes when something goes wrong.
4242

4343
<Tip>
44-
**Want to poke at the management endpoints before writing any code?** Every one of them is live in the [interactive API reference](/api-reference/introduction) — fill in your project credentials and run `List webhooks`, `Register webhook`, or `Delete webhook` straight from your browser. It's the fastest way to confirm credentials work and sanity-check a URL before wiring up a verifier.
44+
**Three ways to register and manage webhooks** — pick whichever fits how you work:
45+
46+
- **Dashboard.** Open your workspace at [app.photon.codes/dashboard](https://app.photon.codes/dashboard) and use the **Webhook** tab to add, list, and remove endpoints with point-and-click. No terminal, no auth headers — friendly enough to hand to a non-engineer.
47+
- **Interactive API reference.** Every endpoint is live in the [API reference](/api-reference/introduction) — paste your project credentials once and fire `List webhooks`, `Register webhook`, or `Delete webhook` straight from your browser. Fastest way to confirm credentials work and sanity-check a URL.
48+
- **`curl` or any HTTP client.** The terminal flow used throughout this guide and the [Quickstart](/webhooks/quickstart). Scriptable, automatable, CI-friendly.
49+
50+
Same three operations under the hood — just three different surfaces over them.
4551
</Tip>
4652

4753
## When to use webhooks

webhooks/quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you already have a deployed HTTPS URL, skip the ngrok step.
1010
## Prerequisites
1111

1212
- A Spectrum project with at least one platform enabled. See [Providers](/spectrum-ts/providers) for the current list, or [Getting Started with Spectrum](/spectrum-ts/getting-started) if you don't have a project yet.
13-
- Your project id and project secret, from the [dashboard](https://app.photon.codes) or `photon projects show`.
13+
- Your project id and project secret, from the [dashboard](https://app.photon.codes/dashboard) or `photon projects show`.
1414
- A reachable HTTPS URL — ngrok works for local development.
1515

1616
<Steps>

0 commit comments

Comments
 (0)