var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri(“https://api-football-v1.p.rapidapi.com/v3/fixtures?date=2021-01-29”),
Headers =
{
{ “x-rapidapi-key”, “750e5ff3a4ms*****************fe2jsnb6a2e3a93623” },//
{ “x-rapidapi-host”, “api-football-v1.p.rapidapi.com” }
},
};
using var response = client.SendAsync(request).Result;
response.EnsureSuccessStatusCode();
var body = response.Content.ReadAsStringAsync();
Console.WriteLine(body);
Hi,
I have test with my code sample:
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri(“https://v3.football.api-sports.io/fixtures?date=2021-01-29”),
Headers =
{
{ “x-rapidapi-key”, “750e5ff3a4ms*****************fe2jsnb6a2e3a93623” },//
{ “x-rapidapi-host”, “v3.football.api-sports.io” }
},
};
using var response = client.SendAsync(request).Result;
response.EnsureSuccessStatusCode();
var body = response.Content.ReadAsStringAsync();
Console.WriteLine(body);
but still get error missing application key we get error. Last month we still call api normally but now api always return error
Hi,
On rapidapi you have to use this url as indicated in the documentation ==> https://www.api-football.com/documentation-v3#section/Authentication
==> https://api-football-v1.p.rapidapi.com/v3/
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri(“https://api-football-v1.p.rapidapi.com/v3/fixtures?date=2021-01-29”),
Headers =
{
{ “x-rapidapi-key”, “750e5ff3a4ms*****************fe2jsnb6a2e3a93623” },//
{ “x-rapidapi-host”, “api-football-v1.p.rapidapi.com” }
},
};
using var response = client.SendAsync(request).Result;
response.EnsureSuccessStatusCode();
var body = response.Content.ReadAsStringAsync();
Console.WriteLine(body);
Best
Hi,
I have test with my code sample:
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri(“https://v3.football.api-sports.io/fixtures?date=2021-01-29”),
Headers =
{
{ “x-rapidapi-key”, “750e5ff3a4ms*****************fe2jsnb6a2e3a93623” },//
{ “x-rapidapi-host”, “v3.football.api-sports.io” }
},
};
using var response = client.SendAsync(request).Result;
response.EnsureSuccessStatusCode();
var body = response.Content.ReadAsStringAsync();
Console.WriteLine(body);
but still get error missing application key we get error. Last month we still call api normally but now api always return error
Hi,
Can you be more precise ?
Have you put the api-key in the headers as indicated in the documentation ==> https://www.api-football.com/documentation-v3#section/Sample-Scripts
Best