forked from zacs/ha-gtfs-rt
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API key error for WMATA #30
Comments
elffaW
pushed a commit
to elffaW/ha-gtfs-rt-v2
that referenced
this issue
Feb 24, 2024
elffaW
added a commit
to elffaW/ha-gtfs-rt-v2
that referenced
this issue
Feb 24, 2024
mark1foley
added a commit
that referenced
this issue
May 7, 2024
fix #30: add api_key_header option to config
elffaW
referenced
this issue
May 7, 2024
Changed default for CONF_API_KEY_HEADER_NAME to "Authorization"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When configured per the documentation, WMATA rejects the attempt to connect to the trip updates URL (https://api.wmata.com/gtfs/rail-gtfsrt-tripupdates.pb) because it says no API key was supplied, even when api_key has a value set in the configuration file. I fixed the issue by changing:
self._headers = {"Authorization": api_key}
to
self._headers = {"api_key": api_key}
in /config/custom_components/gtfs_rt/sensor.py .
It seems WMATA wants the API key presented as "api_key: " instead of "Authorization: ".
The text was updated successfully, but these errors were encountered: