Header Problems with API v1

PaintTheNight
Here to help

Header Problems with API v1

The new API v1 requires a header of:

 

'Authorization: Bearer <key>'

 

With space inbetween "Bearer" and your unique key.

 

I'm trying to convert our Zabbix templates to support the new API but it's having issues with the space. I can get this working in postman so I know the issue lies with Zabbix.

I back the response:

 

{"errors":["Invalid API key"]}

 

Does anyone know anyway around this without raising a support ticket with Zabbix? I've tried using "%20" to escape a space but no luck.

 

4 Replies 4
DexterLaBora
Meraki Employee
Meraki Employee

Try changing the Base URL to

https://api-meraki.com/api/v1

 

The new authentication in version 1 does not always play nice with redirects. This will be resolved when v1 is no longer in beta. 

PaintTheNight
Here to help

This doesn't appear to be an issue with final release of v1 - was able to use "X-Cisco-Meraki-API-Key" to authenticate.

X-Cisco-Meraki-API-Key will work as a header if you run into any issues with bearer tokens.

 

However, if you're seeing redirects on API v1, that might be interesting. What's the header response?

Yurii
Comes here often

Hello PaintTheNight, I would like to ask if you could share the templates for zabbix, which you monitor Meraki from the cloud via API
I will be very grateful.

Get notified when there are additional replies to this discussion.