Meraki webhook fails when using basic auth

SOLVED
DevMan
Comes here often

Meraki webhook fails when using basic auth

I'm attempting to send Meraki event data via Webhooks to a rest endpoint that requires authentication. There does not appear to be a way for me to add headers to my Webhook configurations via the UI so I am adding basic authentication in the Webhook URL. My Webhook URL Looks like this:

 

https://<user>:<password>@collector.test.com/meraki

 

However; Meraki does not seem to like this as it always fails when I run a test. I get 401 unauthorized's as it appear Meraki is stripping out or not forwarding the auth creds. I've verified that the creds and endpoint work by doing the following curl test:

 

curl -X POST https://<user>:<password>@collector.test.com/meraki \
-H 'Content-Type: application/json' \
-d '{"message":"test"}'

 

I'd prefer to use Bearer authentication but there doesn't be a way for me to add http headers to Webhooks. 

 

What's the best way to accomplish this?

1 ACCEPTED SOLUTION
PhilipDAth
Kind of a big deal

Cisco Meraki WebHooks do not support basic authentication.  Just a shared secret.  Here are some examples.

https://developer.cisco.com/meraki/webhooks/#!webhook-sample-alerts 

 

View solution in original post

6 REPLIES 6
Inderdeep
Kind of a big deal

Can  you share what output you are getting ?

Regards
Inderdeep Singh
www.thenetworkdna.com ( Awarded by Cisco IT Blogs award 2020)
DevMan
Comes here often

I misspoke. The test just says "fail" so I don't have any context into where or why it's failing. Is there a way to see what the response code/payload is?

Inderdeep
Kind of a big deal

@DevMan : can you check this postman collection 

https://documenter.getpostman.com/view/897512/SVfRtnU7?version=latest

Regards
Inderdeep Singh
www.thenetworkdna.com ( Awarded by Cisco IT Blogs award 2020)
PhilipDAth
Kind of a big deal

Cisco Meraki WebHooks do not support basic authentication.  Just a shared secret.  Here are some examples.

https://developer.cisco.com/meraki/webhooks/#!webhook-sample-alerts 

 

View solution in original post

DexterLaBora
Meraki Employee

custom headers are coming to a webhook near you...

 

Stay tuned for this Summer's hot updates 😉

 

 

@DexterLaBora : that’s good news, thanks .. waiting 

Regards
Inderdeep Singh
www.thenetworkdna.com ( Awarded by Cisco IT Blogs award 2020)
Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.