Skip to content

Commit 26e2256

Browse files
committed
stab
1 parent e49fa6c commit 26e2256

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/events/Webhook_Events.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ If either of these are not complete, your Webhook Events URL will not be validat
4545

4646
When adding your Webhook Events URL, Discord will send a `POST` request with a `PING` payload with a `type: 0` to your endpoint. Your app is expected to acknowledge the request by returning a `204` response with an empty body.
4747

48+
> info
49+
> You must provide a valid `Content-Type` when responding to `PING`s. See [here](#DOCS_REFERENCE/http-api) for further information.
50+
4851
<Collapsible title="Responding to PING Requests" description="Code example for acknowledging PING events" icon="code">
4952
To properly acknowledge a `PING` payload, return a `204` response with no body:
5053

docs/interactions/Overview.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ If either of these are not complete, your Interactions Endpoint URL will not be
8080

8181
When adding your Interactions Endpoint URL, Discord will send a `POST` request with a `PING` payload with a `type: 1` to your endpoint. Your app is expected to acknowledge the request by returning a `200` response with a `PONG` payload (which has the same `type: 1`). Details about interaction responses are in the [Receiving and Responding documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING).
8282

83+
> info
84+
> You must provide a valid `Content-Type` when responding to `PING`s. See [here](#DOCS_REFERENCE/http-api) for further information.
85+
8386
<Collapsible title="Responding to PING Requests" description="Code example for acknowledging PING interactions" icon="code">
8487
To properly acknowledge a `PING` payload, return a `200` response with a payload of `type: 1`:
8588

docs/interactions/Receiving_and_Responding.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ Now that you've gotten the data from the user, it's time to respond to them.
200200

201201
Interactions--both receiving and responding--are webhooks under the hood. So responding to an Interaction is just like sending a webhook request!
202202

203+
> info
204+
> Interaction responses have the same header requirements as normal HTTP API requests. See [here](#DOCS_REFERENCE/http-api) for further information.
205+
203206
There are a number of ways you can respond to an interaction:
204207

205208
### Interaction Response Object

0 commit comments

Comments
 (0)