HTTP 202 is the HTTP code for “accepted”
Webhooks will 202
https://dev.twitch.tv/docs/api/webhooks-reference
When you subscribe to a webhook, if the parameters are supplied you receive an immediate
202 Acceptedresponse, with an empty body
EventSub will 200 with a JSON Blob of data about the subscription
Example
{
"data": [
{
"id": "26b1c993-bfcf-44d9-b876-379dacafe75a",
"status": "webhook_callback_verification_pending",
"type": "users.update",
"version": "1",
"condition": {
"user_id": "1234"
},
"created_at": "2020-11-10T20:29:44Z",
"transport": {
"method": "webhook",
"callback": "https://this-is-a-callback.com"
},
"cost": 1
}
],
"total": 1,
"total_cost": 1,
"max_total_cost": 10000
}
If webhooks:
Twitch will call the callback to verify exists
Echo back the challenge
Then you wait for data to be POST’ed to the endpoint.
If eventsub
Twitch will call the callback to verify exists
Echo back the challenge
Then you wait for data to be POST’ed to the endpoint.