API-FOOTBALL

פרמיום
Verified
על ידי API-SPORTS | מְעוּדכָּן 3 days ago | Sports
פּוֹפּוּלָרִיוּת

10 / 10

חֶבִיוֹן

352ms

רמת שירות

99%

Health Check

N/A

חזרה לכל הדיונים

call api get error pls advise

Rapid account: Tech Dhz Fhu 5 I
tech-dhzFhu5i_
3 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 3 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 3 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 3 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

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות