1

I am using the TwitchLib nuget package and I want to retrieve a list of drops (entitlements) for a specified game.

I have got the TwitchLib api working as I can get a list of user streams and check if they are online or not.

But I want to use the Helix.Entitlements endpoint to get a list of drops for a game. I thought I could do this using the GetDropsEntitlementsAsync method. I was getting the following message when I tried to use it.

Your request failed because either: 1. Your ClientID was invalid/not set. 2. Your refresh token was invalid. 3. You requested a username when the server was expecting a user ID.

This is the code I am using

var gamesResponse = await TwitchApi.Api.Helix.Games.GetGamesAsync(gameNames: new List<string> { "Halo Infinite" });
var entitlementsResponse = await TwitchApi.Api.Helix.Entitlements.GetDropsEntitlementsAsync(gameId: gamesResponse.Games.FirstOrDefault().Id);

I tried passing in my accounts id as the userId parameter

I checked out the offical documentation for this endpoint and it seems that you might need to own the game to be able to use this endpoint, which I don't. So I'm thinking this endpoint might not be the correct one to use.

If I log on to Twitch and visit the drops page I can see the exact data I want for the game I want. Does anyone have any ideas how I can get drops data for a game?

Bad Dub
  • 1,503
  • 2
  • 22
  • 52

1 Answers1

1

I checked out the offical documentation for this endpoint and it seems that you might need to own the game to be able to use this endpoint, which I don't. So I'm thinking this endpoint might not be the correct one to use.

That is correct, the only apps that can use the Drops endpoints are apps that are created by the organisation on Twitch that owns that game.

If I log on to Twitch and visit the drops page I can see the exact data I want for the game I want. Does anyone have any ideas how I can get drops data for a game?

Not all 1st party data is made available to 3rd parties, and this is one situation where Drop Entitlements are only available either on the Twitch site itself, or to Game Developers, to prevent abuse or people attempting to game the system with bots.

If you have a use case for why you need this data as an end user and not the game developer you should submit that reasoning as a feature request on UserVoice.

Dist
  • 51
  • 2