aj-r / RiotNet

A .NET/C# client for the Riot Games API
MIT License
23 stars 10 forks source link

403 Forbidden on simple test case #19

Open ddurschlag opened 6 years ago

ddurschlag commented 6 years ago

Trying on this client, ran the simple example code:

            var client = new RiotClient(new RiotClientSettings
            {
                ApiKey = "RGAPI-<my api key>" // Replace this with your API key, of course.
            });
            var summoner = await client.GetSummonerBySummonerNameAsync("KirkBerkley", RiotNet.Models.PlatformId.NA1).ConfigureAwait(false);

Consistently getting 403s, even after a key regen. I also notice that the unit tests don't provide a platform id, but I can't seem to run without one.

aj-r commented 6 years ago

The unit tests use NA1 as the plaform ID for most tests - see TestBase.cs.

I'm not sure what's up with the 403 - I'll look into it.

aj-r commented 6 years ago

I regenerated my API key and GetSummonerBySummonerNameAsync works for me. Double-check that you rebuilt your code after changing the API key. If it still doesn't work, check with Riot to see if they blacklisted you for some reason.