Drop Entitlement Grant
The drop.entitlement.grant subscription type sends a notification when an entitlement for a Drop is granted to a user.
This subscription type is only supported by Webhooks and Conduits, and cannot be used with WebSockets.
Subscription
- Type
drop.entitlement.grant- Version
1
Authorization
Requires one of the following:
- An app access token.The Client ID associated with the access token must be owned by a user who is part of the specified organization.
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 organization ID of the organization that owns the game on the developer portal.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. See Processing an Event.
Specify this field only if method is set to webhook.
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.
Specify this field only if the method is set to webhook.
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.
Specify this field only if the method is set to websocket.
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.
Specify this field only if the method is set to conduit.
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 organization ID of the organization that owns the game on the developer portal.subscription.condition.category_idStringThe category (or game) ID of the game for which entitlement notifications will be received.subscription.condition.campaign_idStringThe campaign ID for a specific campaign for which entitlement notifications will be received.
subscription.created_atStringThe time the notification was created.subscription.transportObjectTransport-specific parameters.Hide child attributesShow child attributes
subscription.transport.methodStringThe transport method for EventSub.Possible values
webhookwebsocketconduit
subscription.transport.callbackStringThe callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.
Specify this field only if method is set to webhook.
NOTE: Redirects are not followed.
subscription.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.
Specify this field only if the method is set to webhook.
subscription.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.
Specify this field only if the method is set to websocket.
subscription.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.
Specify this field only if the method is set to conduit.
eventsObject[]The entitlements granted in this notification. This type batches, 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_idStringTwitch category ID of the game that was being played when this benefit was entitled.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_atStringUTC timestamp in ISO format when this entitlement was granted on Twitch.
{
"type": "drop.entitlement.grant",
"version": "1",
"condition": {
"organization_id": "9001",
"category_id": "9002",
"campaign_id": "9003"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback",
"secret": "s3cRe7"
},
"is_batching_enabled": true
}{
"type": "drop.entitlement.grant",
"version": "1",
"condition": {
"organization_id": "9001",
"category_id": "9002",
"campaign_id": "9003"
},
"transport": {
"method": "conduit",
"conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac"
},
"is_batching_enabled": true
}{
"subscription": {
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
"type": "drop.entitlement.grant",
"version": "1",
"status": "enabled",
"condition": {
"organization_id": "9001",
"category_id": "9002",
"campaign_id": "9003"
},
"transport": {
"method": "webhook",
"callback": "https://example.com/webhooks/callback"
},
"created_at": "2019-11-16T10:11:12.634234626Z"
},
"events": [
{
"id": "bf7c8577-e3e3-4881-a78a-e9446641d45d",
"data": {
"organization_id": "9001",
"category_id": "9002",
"category_name": "Fortnite",
"campaign_id": "9003",
"user_id": "1234",
"user_name": "Cool_User",
"user_login": "cool_user",
"entitlement_id": "fb78259e-fb81-4d1b-8333-34a06ffc24c0",
"benefit_id": "74c52265-e214-48a6-91b9-23b6014e8041",
"created_at": "2019-01-28T04:17:53.325Z"
}
},
{
"id": "bf7c8577-e3e3-4881-a78a-e9446641d45c",
"data": {
"organization_id": "9001",
"category_id": "9002",
"category_name": "Fortnite",
"campaign_id": "9003",
"user_id": "12345",
"user_name": "Cooler_User",
"user_login": "cooler_user",
"entitlement_id": "fb78259e-fb81-4d1b-8333-34a06ffc24c0",
"benefit_id": "74c52265-e214-48a6-91b9-23b6014e8041",
"created_at": "2019-01-28T04:17:53.325Z"
}
}
]
}