- Point your web browser to https://ifttt.com/maker_webhooks
- Click on ‘Documentation’ at the top right
- Copy and paste the key to your notepad
- Paste the key to the ‘key’ field and click on the ‘Fire’ button
A Pen by Shigeru Kobayashi on CodePen.
A Pen by Shigeru Kobayashi on CodePen.
let fireButton; | |
let event; | |
let apiKey; | |
function setup() { | |
noCanvas(); | |
event = createInput("event"); | |
apiKey = createInput("key"); | |
fireButton = createButton("Fire!"); | |
fireButton.mousePressed(triggerRequested); | |
} | |
function triggerRequested() { | |
console.log("event: " + event.value()); | |
console.log("key: " + apiKey.value()); | |
const url = | |
"https://maker.ifttt.com/trigger/" + | |
event.value() + | |
"/with/key/" + | |
apiKey.value(); | |
console.log(url); | |
httpPost( | |
url, | |
result => { | |
console.log("OK: " + result); | |
}, | |
error => { | |
console.log("ERROR: " + error); | |
} | |
); | |
} |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.sound.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.dom.min.js"></script> |