Hi everyone,
I’m working on a web map to display live train positions using the TfNSW GTFS-Realtime Vehicle Positions API (trying /v2
endpoints).
The Problem: I keep getting an HTTP 500 Internal Server Error
from the TfNSW API, with the specific message "Policy Falsified"
.
What I’ve done:
- Code Setup: My frontend (JavaScript) is correctly using
protobuf.js
with the official TfNSWgtfs-realtime_1007_extension.proto
file to decode the data. My PHP proxy is also set up correctly to handle requests and pass the API key. - API Key: I’m using a brand new API key generated from the TfNSW Developer Portal.
Crucial Finding (from curl
test): To rule out any issues with my code or proxy, I performed a direct curl
test to the TfNSW API (https://api.transport.nsw.gov.au/v2/gtfs/vehiclepositions
) using my API key.
Even with the curl
command (which confirms the Authorization
header is perfectly clean and correctly sent), I still receive the HTTP 500
and "Policy Falsified"
error.
My Question: Since the error persists even with a clean curl
request to the v2
endpoint, it strongly suggests the issue is with my API key itself. Is it possible that newly generated API keys need to be specifically activated or provisioned for access to the live GTFS-Realtime feeds? Or are there other known reasons for this “Policy Falsified” error with active keys?
Any insights or advice would be greatly appreciated!
Thanks.