2020-07-08, 19:25
(2020-07-08, 18:54)harlekin Wrote: url has to be:
https://xxxxxxx.glitch.me/playpause
(for it to trigger the play/pause action f.e.)
for example.
or
https://xxxxxxx.glitch.me/broker?phrase={{TextField}}
IF someone builds a node.js script for a general interpretation (which we do not have yet)
(edit: This would work as follows, IFTTT would have to be set up to send https://xxxxxxx.glitch.me/broker?phrase={{TextField}} in the json body as well, node.js script would have to parse the body for that url, set it as a variable, and then send the POST command to that url - this should be easy to implement for anyone that knows node.js )
-
Also you are missing the token in the body.
Copy the entire code from https://docs.pipedream.com/workflows/ste...tp-headers
then replace
the url in there with https://xxxxxxx.glitch.me/playpause
and
{ name: "Luke" } with {"token":"YOURTOKEN"}
(yourtoken is the one you set up in .env in glitch (as auth_token))
sorry i'm not a coder so i don't understand what you mean by:
https://xxxxxxx.glitch.me/broker?phrase={{TextField}}
IF someone builds a node.js script for a general interpretation (which we do not have yet)
(edit: This would work as follows, IFTTT would have to be set up to send https://xxxxxxx.glitch.me/broker?phrase={{TextField}} in the json body as well, node.js script would have to parse the body for that url, set it as a variable, and then send the POST command to that url - this should be easy to implement for anyone that knows node.js )
-
I;m trying to use this as i did IFTTT before where all commands were passed to the glitch broker??
so updated code is:
Const ;response = await axios({
method: "POST",
url: 'https://xxxxxmaster.glitch.me/broker?phrase={{TextField}}',
headers: {
"Content-Type": "application/json"
},
data: {name:"Luke"} with {"token":"my glitch token"}
});