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 a list of drops for a game?