Trigger from iOS Shortcuts not working
-
Hey,
I tried to follow the instructions from https://www.triggercmd.com/forum/topic/347/trigger-from-shortcuts-ios
but I keep getting An "Invalid Token" response. Any ideas? Thank you
-
@Lewis-S, I'm not sure why that's not working. I need to buy an iOS device. My iPad is now too old to run the Shortcuts app.
In the meantime, you could remove the authorization header and instead send the token as another parameter called token in the Request Body section.
Also, I'm not sure those { and }'s are necessary. You could try without those if it still doesn't work. I'm pretty sure they would not be necessary if you switch from JSON to Form.
-
@Russ That worked! Once i moved the token, and removed all the curlybrackets, it worked! Thank you very much.
Would you mind telling me the different between the triggercmdagent and /usr/share/triggercmdagent/app/src/installdaemon.sh ?
Thank you
-
@Lewis-S, awesome. I'm glad that worked.
triggercmdagent is the command you can run to run the agent in the foreground on Linux or Raspberry Pi. It's also good for installing the token.
/usr/share/triggercmdagent/app/src/installdaemon.sh installs the agent to run in background mode and run background commands - generally as root.
-
@Russ That's what I thought. Thank you very much!
-
@Lewis-S, you're welcome.
I need to get an iOS device. My iPad is too old to run that Shortcuts app. -
Can someone write an ios shortcut with instructions what personal information to fill in? I don’t know how to write them. Thanks
-
@user01010, I'm working on getting an iOS device so I can take some screenshots, but in the meantime you can look at the screenshots above, and change these things:
- Remove the "authorization" header
- Add "token" under Request Body and paste your token from the Instructions page in as the value.
- Remove the } and { characters.
- Optional: change computername and triggername to computer and trigger.
Example:
computer=macbook
trigger=calculator
token=(token from the instructions page)