API-BASKETBALL

FREEMIUM
By API-SPORTS | Updated 12 дней назад | Sports
Popularity

9.9 / 10

Latency

315ms

Service Level

99%

Health Check

N/A

Back to All Discussions

Forbidden

Rapid account: Nchandel 562
nchandel562
год назад

I am getting 403 how can i fixed it

HttpClientHandler handler = new HttpClientHandler();
HttpClient client = new HttpClient(handler);

        client.DefaultRequestHeaders.Add("X-RapidAPI-Key", "d8d43bd3f0msh5f58181c9ac8b78p1c4c6ajsn359702295898");
        client.DefaultRequestHeaders.Add("X-RapidAPI-Host", "api-basketball.p.rapidapi.com");


        var result = client.GetAsync("https://api-basketball.p.rapidapi.com/timezone").Result;

        if (result.IsSuccessStatusCode)
        {
            Console.WriteLine("Done" + result.StatusCode);
            var JsonContent = result.Content.ReadAsStringAsync().Result;
            Console.WriteLine(JsonContent);
        }
        else
        {
            Console.WriteLine(result.StatusCode);
        }

Join in the discussion - add comment below:

Login / Signup to post new comments