Site
Home / Forum / 3rd Party Projects / livescore regression

livescore regression


Posted: 09 Aug 2024 15:25
smathers


Posts: 42
Joined: 2023

My app was working fine all of last season accessing livescores of the Scottish Leagues via the following endpoint example for the Scottish Premiership:

https://www.thesportsdb.com/api/v2/json/{API_KEY}/livescore.php?l=4330

Even after I was recently given another API Key, the above call no longer works i.e. even with the free key "3" it returns:

{"error":"Invalid ID Passed"}

I see that the following DOES appear to work:
https://www.thesportsdb.com/api/v2/json/3/livescore/4330

Can you please reinstate the original livescore endpoint operation, so that my users can get live scores again. I luckily use AWS code to handle all android phone app accesses to thesportsdb APi so have been able to disable it for now.

Cheers,
Stewart


Update 17th August 2024
"Scottish Football League Info" Android App now successfully using the v2 livescores with header based API-KEY.








Posted: 10 Aug 2024 12:48
smathers


Posts: 42
Joined: 2023

After further investigation, I have confirmed that:

https://www.thesportsdb.com/api/v2/json/3/livescore/4330

is not compatible with the JSON returned for:

https://www.thesportsdb.com/api/v2/json/{API_KEY}/livescore.php?l=4330

in that the former returns a "league" JSON structure, whereas the latter returns an "events" one.


zag
Posted: 11 Aug 2024 21:55

zag


Posts: 3,511
Joined: 2020

Are you sure?

V2 of the API is only 2 months old and is very much in testing and not confirmed yet and is still very much at the feature request stage.

Were you possibly using V1 and now V2 where it is expected to change?

I'm interested as I want to make its perfect, so any comments are most welcome.





Posted: 13 Aug 2024 14:02
smathers


Posts: 42
Joined: 2023

I'll revisit and get back to you!

Posted: 13 Aug 2024 15:20
smathers


Posts: 42
Joined: 2023

Did a sanity check. The wayback machine snapshot from November 2023 at:-

https://web.archive.org/web/20231122122106/https://www.thesportsdb.com/free_sports_api

Says:
"Larger API Limits (Patreon only)
Livescores V1 (Patreon only) V2 is now recommended for livescores"
Then gives a sample:
https://www.thesportsdb.com/api/v2/json/APIKEY/livescore.php?l=4399

I thus successfully used the V2 sample based calls, as above, for all of last season for the four Scottish Leagues. It was only when the new Scottish Football season opened two Saturdays ago, that I noticed that it no longer worked, causing strange behaviour with my app until I initially disabled it on AWS code, then hack got it working last weekend, with the following endpoint sample:

https://www.thesportsdb.com/api/v2/json/APIKEY/livescore/4330

Sounds like my hack for the above will break this weekend unless I move the api-key to the header - correct?


Update
----------
I trialled the v2 API with the api-key in the header and confirmed it is working with the updated API-Key you gave me and not with the original which does however continue to work with v1 . I also noted a subtle change in behaviour from that of:

https://www.thesportsdb.com/api/v2/json/APIKEY/livescore/4330

With the api-key passed in the header, it now returns:-
{"Message":"No data found"}

whereas I was previously getting:
{"league":"No data found"}':


Can you also confirm that all livescore endpoint calls with V2, which HAVE data, shall now return JSON beginning with
{"livescore":..

as opposed to:
{"league":.. ( as per https://www.thesportsdb.com/api/v2/json/APIKEY/livescore/4330 )

Cheers,
Stewart









Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 5 (Total: 5)