How to call properly request with API KEY X-ClientId

Hey,

i am using API which could be used anonymously with big limitation of calls per 24 hours, or with API KEY where limitation is almost none. I received API key from API owner and tried to connect with

url = ‘xxxxxxxxx’
api_key=‘xxxxxxx’
headers = {‘Authorization’: f’Bearer {api_key}'}
response = requests.get(url, headers=headers)

And still i am reaching limitations like anonymous user, i reconfirmed twice my api key with API owner and last his answer his, you should add to each of your call into header X-ClientId.

I have no extended experience with APIs, so anyone idea how to do that please?
I would appreciate any help.

Thank you

You added one header by using the headers parameter. What it seems to be asking you to do is add a second header as well:

headers = {
    'Authorization': 'Bearer ' + api_key,
    'X-ClientId': client_id,
}

But without knowing more about the actual API, all I can do is guess.

Hey,
first of all thanks for your help.

At webpage documentation of this API is possibility to try API call through form, where i feed this API key and then it works, unfortunately there is no Python code attached of this call, only curl

curl -X 'GET' \
  'https://api-dbw.stat.gov.pl/api/1.1.0/dictionaries/date-dictionary?page=0&page-size=1000&lang=pl' \
  -H 'accept: application/json' \
  -H 'X-ClientId: ApiKey'


Where ApiKey value is this API KEY provided to me by API owner

thanks
curl -X 'GET' \
  'https://api-dbw.stat.gov.pl/api/1.1.0/dictionaries/date-dictionary?page=0&page-size=1000&lang=pl' \
  -H 'accept: application/json' \
  -H 'X-ClientId: XYZ123456789'

This is code as example how properly should be API called based on documentation webpage. There is no python code, only curl. XYZ123456789 is API key i received from API owner

Multiple headers should just be additional key:value pairs in the dictionary.

url = 'xxxxxxxxx'
api_key='xxxxxxx'
headers = {'accept': 'application/json', 'X-ClientId': api_key}
response = requests.get(url, headers=headers)