403 forbidden for all subway feeds

66 views
Skip to first unread message

Ben Owens

unread,
Feb 26, 2025, 10:05:56 PMFeb 26
to mtadeveloperresources
Is an API key still required? 2025-02-25 23:34:20.955 ERROR (SyncWorker_2) [custom_components.gtfs_rt.sensor] Error fetching GTFS-RT data for 123456S: 403 Client Error: Forbidden for url: https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct/gtfs
2025-02-25 23:34:21.045 ERROR (SyncWorker_1) [custom_components.gtfs_rt.sensor] Error fetching GTFS-RT data for BDFM: 403 Client Error: Forbidden for url: https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct/gtfs-bdfm
2025-02-25 23:34:21.161 ERROR (SyncWorker_3) [custom_components.gtfs_rt.sensor] Error fetching GTFS-RT data for NQRW: 403 Client Error: Forbidden for url: https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct/gtfs-nqrw

Kirk Enbysk

unread,
Mar 29, 2025, 3:03:53 AMMar 29
to mtadeveloperresources
This has been giving me a headache for hours, but I think I’ve finally solved it! The issue seems to be with the URL encoding. When I replaced the "%2F" with a "/", I was getting a 403 error. Requesting a URL with "%2F" worked for me and returned the correct real-time train data as a protobuf response with no nonsense about auth or API keys.

Here’s the working URL I used for the G train:



Cheers,
Kirk
Reply all
Reply to author
Forward
0 new messages