Meraki/IFTTT webhook/api issue unable to get ifttt to execute the command

ali22asghar
New here

Meraki/IFTTT webhook/api issue unable to get ifttt to execute the command

curl -X PUT \ --url 'https://api.meraki.com/api/v0/networks/networkid/clients/MAC/policy' \ -H 'X-Cisco-Meraki-API-Key: key_goes_here'\  -H 'Accept: application/json' \  -H 'Content-type: application/json' \ --data-raw '{ "devicePolicy": "Blocked" }'

 

 

I have the above code that works in postman program  when running the code it works fine however i am trying to intergrate this into IFTTT for a google voice command and i am really stuck i have set the URL as "https://api.meraki.com/api/v0/networks/networkid/clients/MAC/policy"

this does take me to a web page where it displays the device mac and current policy using my web browser however using a PUT request should change the device to a blocked state.

 

 

I have added the code above in the body and set it to application/JSON in Ifttt however no luck, im not too technical in regards to API's and webhooks and programming in general could somone help me out in trying to get this to work i have bene googling for hours but cannot get the right syntax to work the URL in the picture is being used as api.meraki.com is being redirected to that address and i see no way of doing a redirect in ifttt so i just used the redirected webaddress to bypass the api.meraki.com when running the webhook in ifttt i get a 400 server error. 

pib1.PNG

1 Reply 1
CptnCrnch
Kind of a big deal
Kind of a big deal

IFTTT doesn't "understand" the format of the Webhooks response. You'd need some kind of middleware that will translate the message to the corresponding format.

 

On the other hand, you could simply use Zapier which works out of the box. 😉

Get notified when there are additional replies to this discussion.