• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Trigger from iOS Shortcuts not working

General Discussion
3
8
554
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ?
    A Former User
    last edited by Apr 2, 2020, 7:02 PM

    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

    signal-attachment-2020-04-02-200101_001.jpeg signal-attachment-2020-04-02-200101_002.jpeg

    R 1 Reply Last reply Apr 2, 2020, 7:37 PM Reply Quote 0
    • R
      Russ @A Former User
      last edited by Russ Apr 2, 2020, 8:06 PM Apr 2, 2020, 7:37 PM

      @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.

      Russell VanderMey

      ? 1 Reply Last reply Apr 2, 2020, 8:14 PM Reply Quote 0
      • ?
        A Former User @Russ
        last edited by Apr 2, 2020, 8:14 PM

        @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

        R 1 Reply Last reply Apr 2, 2020, 8:36 PM Reply Quote 0
        • R
          Russ @A Former User
          last edited by Apr 2, 2020, 8:36 PM

          @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.

          Russell VanderMey

          ? 1 Reply Last reply Apr 2, 2020, 8:37 PM Reply Quote 0
          • ?
            A Former User @Russ
            last edited by Apr 2, 2020, 8:37 PM

            @Russ That's what I thought. Thank you very much!

            R 1 Reply Last reply Apr 2, 2020, 8:41 PM Reply Quote 0
            • R
              Russ @A Former User
              last edited by Apr 2, 2020, 8:41 PM

              @Lewis-S, you're welcome.
              I need to get an iOS device. My iPad is too old to run that Shortcuts app.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • U
                user01010
                last edited by Apr 17, 2020, 4:20 AM

                Can someone write an ios shortcut with instructions what personal information to fill in? I don’t know how to write them. Thanks

                R 1 Reply Last reply Apr 17, 2020, 1:26 PM Reply Quote 0
                • R
                  Russ @user01010
                  last edited by Russ Apr 17, 2020, 1:28 PM Apr 17, 2020, 1:26 PM

                  @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:

                  1. Remove the "authorization" header
                  2. Add "token" under Request Body and paste your token from the Instructions page in as the value.
                  3. Remove the } and { characters.
                  4. Optional: change computername and triggername to computer and trigger.

                  Example:
                  computer=macbook
                  trigger=calculator
                  token=(token from the instructions page)

                  Russell VanderMey

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post