The idea is to have a script that automatically downloads a json file with the list of members of the Celonis environment through the Members API (/api/external/members).
I have the following code:
url = ""
api_token = ""
key_type = "AppKey"
headers = {
key_type: api_token,
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
'Body-Type': 'application/json',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'
}
response = requests.get(url=url, headers=headers)
This code always returns <Response o403]> (Access denied). However, the api key I'm using works perfectly in the Swagger UI webpage, being able to download the json file without any problems.
I wrote a ticket to Celonis support and they told me it's possible to perform a GET request, but I can't seem to find a way to do it.