Documentation

Wait for a phone decision before continuing.

Try a harmless Ntfyx approval gate. Continue only after a verified Allow and a successful one-time claim; stop on Deny, timeout, connection failure or an already claimed answer.

Before you start

#

Install the current Ntfyx CLI (0.1.2) on macOS or Linux and use a compatible Ntfyx iPhone build (iOS 18.4 or later). The iPhone app is awaiting App Store review; installing the CLI alone does not give you a connected phone. Free includes one active Topic. Several sources can use that Topic; adding a source does not require another paid Topic.

  1. Display the fresh pairing QR on your computer. Keep the QR private.
  2. In the iPhone app, open Connect Topic, scan the QR, and create or choose a named Topic. Authorize this computer.
  3. Use Work as the local CLI alias in these examples, or replace Work with your configured alias.
Terminal
curl -fsSL https://ntfyx.me/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
ntfyx version --json
ntfyx connect
ntfyx topics

Inspect and run the demo

#

This example asks a question, waits synchronously and prints a harmless demo message only when the CLI returns success. It does not deploy software, run a payment or execute an external operation.

Terminal
curl -fsSLo approval-demo.sh https://ntfyx.me/examples/scripts/approval-demo.sh
cat approval-demo.sh
bash approval-demo.sh Work

Answer on your phone

#

Open the request titled Review the demo step. Check the question and choose Allow or Deny. You can also answer a new request in a browser that your phone authorized. The receiver signs and encrypts the answer for the original source.

Ntfyx Web Inbox showing Continue the demo with Allow and Deny actions.
Actual local Web test with a synthetic request. A signed browser answer exercises the same request protocol; this screenshot does not establish phone delivery.

Understand the exit status

#

The script waits up to 60 seconds by default and the request expires after 90 seconds. A pending request can remain answerable after the local wait ends. A late reply never restarts an exited script.

OutcomeCLI exitDemo continues?
Verified Allow and claim acquired0Yes, prints one demo line.
Deny10No.
Local wait timed out14No.
Answer already claimed15No.
Transport failureNonzeroNo.
Terminal
bash approval-demo.sh Work 1s

Connect a real operation carefully

#

The synchronous CLI verifies the reply and acquires its one-time claim before returning success. Only the successful branch may continue. Keep your external operation idempotent and record its outcome separately: a claim cannot make an external deployment or transaction exactly once. If the result of a claim or operation is unknown, investigate instead of automatically rerunning the operation or requesting a fresh approval.

What was verified

#

These scripts were tested with the compiled CLI, a real local encrypted relay and signed replies from the Web Inbox. Phone authorization in that automated test used a programmatic identity. The screenshots show synthetic messages from that local Web test; they are not iPhone or APNs delivery evidence.