Drop Entitlement Grant
The drop.entitlement.grant subscription type sends a notification when a user claims a Drop and is
granted an entitlement for it. Each reward in the claimed Drop that your game fulfills produces its
own entitlement. Rewards that Twitch fulfills itself, such as badges and emotes, don't send this
notification.
This subscription type is only supported by Webhooks.
Subscription
- Type
drop.entitlement.grant- Version
1
Authorization
Requires one of the following:
- An app access token.The client ID in the access token must belong to an application owned by the organization specified in organization_id, and the application's owner must be a member of that organization. Twitch repeats this check before sending each notification. If it fails, for example because the application's owner left the organization, the subscription is revoked with status authorization_revoked.
Subscription Request Body
typeStringRequiredThe subscription type name:drop.entitlement.grant.versionStringRequiredThe subscription type version:1.conditionObjectRequiredSubscription-specific parameters. Pass in the organization_id to subscribe to all drop entitlement grant notifications for that organization.Hide child attributesShow child attributes
condition.organization_idStringRequiredThe ID of the organization that owns the game. Your application must belong to this organization.condition.category_idStringThe category (or game) ID of the game for which entitlement notifications will be received.condition.campaign_idStringThe campaign ID for a specific campaign for which entitlement notifications will be received.
transportObjectRequiredTransport-specific parameters.Hide child attributesShow child attributes
transport.methodStringRequiredThe transport method for EventSub.Possible values
webhookwebsocketconduit
transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.
Required if method is webhook. Don't specify it for other methods.
NOTE: Redirects are not followed.
transport.secretStringThe secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.
Required if method is webhook. Don't specify it for other methods.
transport.session_idStringAn ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.
Required if method is websocket. Don't specify it for other methods.
transport.conduit_idStringAn ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.
Required if method is conduit. Don't specify it for other methods.
is_batching_enabledBooleanRequiredNeeds to be true for this subscription type.
Event Payload
subscriptionObjectMetadata about the subscription.Hide child attributesShow child attributes
subscription.idStringThe Subscription ID of the subscription.subscription.typeStringThe notification's subscription type.subscription.versionStringThe version of the subscription.subscription.statusStringThe status of the subscription.subscription.costIntegerHow much the subscription counts against your limit. See Subscription Limits for more information.subscription.conditionObjectSubscription-specific parameters.Hide child attributesShow child attributes
subscription.condition.organization_idStringThe ID of the organization that owns the game. Your application must belong to this organization.subscription.condition.category_idStringThe category (or game) ID of the game for which entitlement notifications will be received. Is an empty string if you didn't specify it when you subscribed.subscription.condition.campaign_idStringThe campaign ID for a specific campaign for which entitlement notifications will be received. Is an empty string if you didn't specify it when you subscribed.
subscription.created_atStringThe UTC date and time (in RFC3339 format) of when the subscription was created.subscription.transportObjectThe transport that the notification was sent over.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. Included only ifmethodis webhook.subscription.transport.session_idStringThe ID of the WebSocket session that notifications are sent to. Included only ifmethodis websocket.subscription.transport.conduit_idStringThe ID of the conduit that notifications are sent to. Included only ifmethodis conduit.
subscription.is_batching_enabledBooleanAlways true, because this subscription type's notifications are batched.
eventsObject[]The entitlements granted in this notification. Notifications are batched, so a notification carries one or more.Hide child attributesShow child attributes
events.idStringIndividual event ID, as assigned by EventSub. Use this for de-duplicating messages.events.dataObjectThe granted entitlement.Hide child attributesShow child attributes
events.data.organization_idStringThe ID of the organization that owns the game that has Drops enabled.events.data.category_idStringThe ID of the category (game) that the Drop's benefit is for.events.data.category_nameStringThe category name.events.data.campaign_idStringThe campaign this entitlement is associated with.events.data.user_idStringTwitch user ID of the user who was granted the entitlement.events.data.user_nameStringThe user display name of the user who was granted the entitlement.events.data.user_loginStringThe user login of the user who was granted the entitlement.events.data.entitlement_idStringUnique identifier of the entitlement. Use this to de-duplicate entitlements.events.data.benefit_idStringIdentifier of the Benefit.events.data.created_atStringThe UTC date and time (in RFC3339 format) of when the user earned the Drop. The notification is sent when the user claims the Drop, so this can be earlier than the notification.
{
"type": "drop.entitlement.grant",
"version": "1",
"condition": {
"organization_id": "8b65e332-9430-4b49-a064-b7c4913c82e4",
"category_id": "9002",
"campaign_id": "f3345e7d-d89b-4ecb-bfcb-11c0cd37163c"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
},
"is_batching_enabled": true
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "drop.entitlement.grant",
"version": "1",
"status": "enabled",
"cost": 1,
"condition": {
"organization_id": "8b65e332-9430-4b49-a064-b7c4913c82e4",
"category_id": "9002",
"campaign_id": "f3345e7d-d89b-4ecb-bfcb-11c0cd37163c"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z",
"is_batching_enabled": true
},
"events": [
{
"id": "OIsoE4U7dG8Kc93n1pdJTlIPZ-JdEs64MBHNIEuaTfw=",
"data": {
"organization_id": "8b65e332-9430-4b49-a064-b7c4913c82e4",
"category_id": "9002",
"category_name": "Fortnite",
"campaign_id": "f3345e7d-d89b-4ecb-bfcb-11c0cd37163c",
"user_id": "1234",
"user_name": "Cool_User",
"user_login": "cool_user",
"entitlement_id": "MTIzNHw3NGM1MjI2NS1lMjE0LTQ4YTYtOTFiOS0yM2I2MDE0ZTgwNDF8OWM4ZTdhNTItNWQzYi00ZjFhLThiMGUtMmY2ZDRjMWE3ZTkz",
"benefit_id": "74c52265-e214-48a6-91b9-23b6014e8041",
"created_at": "2019-01-28T04:17:53.325Z"
}
},
{
"id": "NkcbI-kRlC0-BE-O367tI-pO98rUypS5gQIoKJJNZFA=",
"data": {
"organization_id": "8b65e332-9430-4b49-a064-b7c4913c82e4",
"category_id": "9002",
"category_name": "Fortnite",
"campaign_id": "f3345e7d-d89b-4ecb-bfcb-11c0cd37163c",
"user_id": "12345",
"user_name": "Cooler_User",
"user_login": "cooler_user",
"entitlement_id": "MTIzNDV8NzRjNTIyNjUtZTIxNC00OGE2LTkxYjktMjNiNjAxNGU4MDQxfDFmMGIzYzZlLThhMmQtNGU1Ny05YzQxLTdiNWEyZTlkMGYxOA==",
"benefit_id": "74c52265-e214-48a6-91b9-23b6014e8041",
"created_at": "2019-01-28T04:17:53.325Z"
}
}
]
}