"Invalid API key" error in postman/python

metafore
New here

"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
MyHomeNWLab
A model citizen

DevNet users can regenerate their API Key, so it may have been changed to a different API Key.

Ajeet_007
New here

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.