Hey I get the following error ```descope_mgmt_cli...
# ask-a-descoper
s
Hey I get the following error
Copy code
descope_mgmt_client = DescopeClient(
                    project_id=app.config['DESCOPE_PROJECT_ID'],
                    management_key=app.config['DESCOPE_MANAGEMENT_KEY']
                )
user_response = descope_mgmt_client.mgmt.user.load(user_id)
I use the project id elsewehere as well so I know it works. The management key is a string which is generated from the Descope console at Company > Management Keys. Have also double checked the management key is a string. Descope version 1.7.12
Copy code
Traceback (most recent call last):
  File "string", line 1, in module
  File "/Users/djokester/anaconda3/envs/venv/lib/python3.12/site-packages/descope/management/user.py", line 589, in load
    response = self._http.get(
               ^^^^^^^^^^^^^^^
  File "/Users/djokester/anaconda3/envs/venv/lib/python3.12/site-packages/descope/http_client.py", line 88, in get
    self._raise_from_response(response)
  File "/Users/djokester/anaconda3/envs/venv/lib/python3.12/site-packages/descope/http_client.py", line 196, in _raise_from_response
    raise AuthException(
descope.exceptions.AuthException: {'status_code': 400, 'error_type': 'server error', 'error_message': '{"errorCode":"E111002","errorDescription":"Management key format is invalid"}'}
c
Hey Samriddhi, This is the hidden key value that is a one time get right? You aren't using the Key ID correct? I'd suggest printing the project ID and the key you're trying to use there within your python code, then try to use the
PRID:mgmt_key
to do a user load in our docs to ensure it's not an incorrect key issue. https://docs.descope.com/api/management/users/search-users