Skip to content

Error 500 trying to reach the API #20

Description

@Adesfire

Hi there,
I just set up this nice project. MQTT communication is fine, I simplified my Gazpar password by removing special chars (it stills long though).
And here the logs I got when I start my container:

2025-07-14 17:20:22,185 DEBUG [urllib3.connectionpool] 
  https://connexion.grdf.fr:443 
  "GET /oauth2/aus5y******WIR417/v1/authorize?response_type=code&scope=openid+profile+email&client_id=0oa95ese18blzdg3p417&state=%2F&redirect_uri=https://monespace.grdf.fr/_codexch&nonce=A9Xkq3Ls*******************We4dpo&by_pass_okta=1&capp=meg HTTP/11" 302 0

2025-07-14 17:20:22,211 DEBUG [urllib3.connectionpool] 
  https://monespace.grdf.fr:443 
  "GET /_codexch?state=%2F&error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request. HTTP/11" 500 37

2025-07-14 17:20:22,213 ERROR [pygazpar.client] 
  An unexpected error occurred while loading the data
Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/client.py", line 71, in load_date_range
    res = self.__dataSource.load(pce_identifier, start_date, end_date, frequencies)
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/datasource.py", line 87, in load
    self._api_client.login()
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/api_client.py", line 109, in login
    raise ServerError(
pygazpar.api_client.ServerError: 
  An error occurred while getting the auth token. 
  Status code: 500 - NGINX / OpenID Connect login failure

2025-07-14 17:20:22,220 WARNING [root] 
  Error while fetching data from GrDF:
Traceback (most recent call last):
  File "/app/gazpar2mqtt/gazpar.py", line 47, in publish
    data = self._read_pygazpar_data(grdf_username, grdf_password, grdf_pce_identifier, grdf_last_days)
  File "/app/gazpar2mqtt/gazpar.py", line 111, in _read_pygazpar_data
    dataByFrequency = client.load_since(
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/client.py", line 59, in load_since
    res = self.load_date_range(pce_identifier, start_date, end_date, frequencies)
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/client.py", line 71, in load_date_range
    res = self.__dataSource.load(pce_identifier, start_date, end_date, frequencies)
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/datasource.py", line 87, in load
    self._api_client.login()
  File "/app/.venv/lib/python3.12/site-packages/pygazpar/api_client.py", line 109, in login
    raise ServerError(
pygazpar.api_client.ServerError: 
  An error occurred while getting the auth token. 
  Status code: 500 - NGINX / OpenID Connect login failure

It's like if they added MFA system whatsoever...

Hope I didn't miss a thing and it's really an issue with the provider here :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions