API-FOOTBALL

부분 유료
Verified
분류별 API-SPORTS | 업데이트됨 4 days ago | Sports
인기

10 / 10

지연 시간

386ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

call api get error pls advise

Rapid account: Tech Dhz Fhu 5 I
tech-dhzFhu5i_
2 years ago

Error/Missing application key. Go to https://www.api-football.com/documentation-v3 to learn how to get your API application key.

Rapid account: Api Sports
api-sports Commented 2 years ago

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

Rapid account: Tech Dhz Fhu 5 I
tech-dhzFhu5i_ Commented 2 years ago

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

Rapid account: Api Sports
api-sports Commented 2 years ago

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입