Aug 15 2022
8:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 15 2022
8:43 PM
"Invalid API key" error in postman/python
Hi there,
I am trying to run below script to devnet sandbox always on box. but getting invalid key error.
import requests
import json
payload={}
headers = {
'Content-Type': 'application/json',
'X-Cisco-Meraki-API-Key': '986773fd633680440b7ac8c9e07f6cf2d8696bd0'
}
response = requests.request("GET", url, headers=headers, data=payload, verify= False)
print(response.text)
Response:
{"errors":["Invalid API key"]}
Response:
if I change header to apiKey {"errors":["Missing API key"]}---I get this error.
Kindly suggest.
2 Replies 2
Aug 15 2022
9:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 15 2022
9:14 PM
DevNet users can regenerate their API Key, so it may have been changed to a different API Key.
Mar 13 2024
10:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 13 2024
10:36 PM
Cisco Meraki has this issue. The same API key is working via postman but not via python code.
Error:
{"errors":["Invalid API key"]}

Get notified when there are additional replies to this discussion.