Sure, here is a part of it: from requests import get
url = 'https://api.meraki.com'
api_url = url + '/api/v0'
# different in my code
api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
api_header = {
'X-Cisco-Meraki-API-Key': api_key,
'Content-Type': 'application/json'
}
# different in my code
org_id = 00_00_00
def rprint(rq):
if rq.status_code == 404:
print('** ERROR')
else:
print(f'[{rq.status_code}]\t{rq.json()}')
if __name__ == '__main__':
rprint(get(api_url + f'/organizations', headers=api_header))
rprint(get(api_url + f'/organizations/{org_id}/admins', headers=api_header)) and it's printing: [200] [{'id': XXXXXX, 'name': 'xxxxxxxxxxxxxxxxx'}]
** ERROR
Process finished with exit code 0 I generated another API key, so this one is definitely valid, but I have the same result..
... View more