SL Platsuppslag - This api is currently not available for keys with priority above 0
Hi,
I'm trying my first project scraping information via API. Exciting!
When I request
parameters = {
'key': sl_reseplanerare2_api_nyckel,
'lang': 'sv',
'numChg': '0',
'originId': 9509,
'destId': 6086,
'useMetro': 0,
'useTram':0,
'realtime': 'true'
}
from https://api.sl.se/api2/TravelplannerV2/trip.json
I get the response "This api is currently not available for keys with priority above 0". Is this a temporary thing? Is there something I can do to get the trip suggestions?
I'm trying my first project scraping information via API. Exciting!
When I request
parameters = {
'key': sl_reseplanerare2_api_nyckel,
'lang': 'sv',
'numChg': '0',
'originId': 9509,
'destId': 6086,
'useMetro': 0,
'useTram':0,
'realtime': 'true'
}
from https://api.sl.se/api2/TravelplannerV2/trip.json
I get the response "This api is currently not available for keys with priority above 0". Is this a temporary thing? Is there something I can do to get the trip suggestions?
Följ inlägget
0
följare
Just to be sure, are you calling the API with the parameters in the query string? (As your example is a JSON array). It should look like https://api.sl.se/api2/TravelplannerV2/trip.json?key=...&originExtId=..&...
Also note that you probably should be using originExtId and destExtId instead of originId and destId.
Regards,
Bert
My bad, I looked at a documentation page for Travelplanner 2 and pointed my script to the V2 endpoint, while I tried to authenticate with a V3.1 key.
Seems using V3.1 documentation, key and endpoint consistently works wonders...
Thanks for pointing me in the right direction