I’m using the API explorer on the site but for some reason, whenever I click ‘Try it out’ it doesn’t work for me - I keep getting 401, ‘The calling application is unauthenticated’. I have selected my application and it’s enabled and the API key is appearing. When I go to other APIs it works, but only Trip Planner API is giving me troubles.
EDIT: I also have another question – I’m planning to create a web app (mainly frontend) using the APIs available, is this possible without a server? I say this because I haven’t been able to make a simple API request work with just XMLHttpRequest() because the API doesn’t accept ‘Allow-Control-Access-Origin’.
Looks like the API explorer (Swagger) for the Trip Planner API is pointed at the wrong API server. We’ll need someone from the Open Data team to fix it up.
Re CORS, it’s not currently supported by the API – you’ll need to set up some form of intermediary proxy. Also, it might not be a good idea to expose your API key publicly.