SSyncropel Docs

Pair, share, invite

How to add a phone or a colleague to a Syncropel workspace: create a one-time invite, then scan or click the link.

What this is

Invites are issued from the command line

You create and manage invites with spl invite (or the /v1/invites/* API). The person you invite opens a page on your workspace to accept. In Studio, the + add a connection pane manages what a person holds (connections, keys, devices), and members with permission to invite can make guest links from a thread. Creating invites in bulk is a command-line task. The steps below use the command line.

An invite is a one-time link that adds one of two things to your workspace:

  1. A new device of yours, such as a phone, a tablet or a fresh laptop. It joins as a guest and the device keeps its own credential. If you revoke the invite's access, the device is signed out. The guest can keep a key to come back on another device.
  2. A colleague with their own workspace. They sign in with the identity from their own workspace, and your workspace checks that identity before it gives them access scoped to what you granted.

There is a third kind, the membership invite (spl invite create --member --preset contributor). It adds a teammate to your member list, so their reviews are signed as them, with access to the whole workspace rather than one thread. See Add a teammate.

Who this is for

  • People adding their phone or another device to their workspace.
  • People inviting a colleague to a specific thread or namespace.
  • Anyone who needs to revoke access later (lost device, team change).

If you are building invites into your own app, see the API reference for the /v1/invites/* routes and the body-kinds reference for the record formats.

How it works

  1. You create an invite from the command line, choosing:

    • An optional device label (--device-label "iPhone 15", "Alice's laptop").
    • An access level: --preset reader (read records), contributor (read and write) or admin (full control). You have to choose one. An invite that doesn't say is refused.
    • Expires in: --ttl <seconds> (default 24 hours).
    • Max uses: --max-uses 1|5|10. One use is normal. More is for handing a QR code around a room.
  2. Run the command. It prints a signed link:

    spl invite create --preset contributor --ttl 900 --device-label "My phone"
  3. The recipient opens the link (or scans the QR code):

    • A guest device sees a preview page, presses the pair button, and lands in your workspace with its own credential.
    • A colleague with their own workspace chooses which identity to sign in with. Their workspace vouches for them, and they land in yours.
  4. spl invite list shows each invite's state: active, redeemed, revoked, expired or exhausted. Revoking is one command, and you can clear every expired or exhausted invite in one go.

Step-by-step: pair your phone

  1. On the machine that talks to your workspace, create a short-lived, single-use invite:

    spl invite create --preset contributor --ttl 900 --max-uses 1 --device-label "My phone"
  2. The command prints the signed link. Type or paste it into the phone's browser.

  3. On the phone, open the link (typed, pasted or scanned). The preview page shows a "Pair with this workspace" button.

  4. Tap it. The phone is signed in to your workspace.

  5. Back on the desktop, spl invite list shows the invite changed from active to redeemed.

spl pair is a different way to connect a device. It gives the device a key directly and shows a QR code. It makes no invite, so spl invite list doesn't show it. See Pairing a browser or phone.

Step-by-step: invite a colleague from another workspace

Bob has his own workspace at bob.syncropel.app. Alice wants Bob to see a specific thread on alice.syncropel.app.

  1. Alice creates the invite:

    spl invite create --preset reader --device-label "Bob (federated)"

    Choose reader if Bob only needs to read. To limit the invite to one thread, or to colleagues with their own workspace only, create it through the API instead: POST /v1/invites with scope_target: {"kind": "thread", "thread_id": "..."} and accept_holder_types: ["federated"] (see the API reference).

  2. Alice sends Bob the link by chat or email. The link is signed, so any change to it is detected.

  3. Bob opens the link and chooses the workspace he is signed in to (bob.syncropel.app).

  4. Bob's workspace vouches for him, and Alice's workspace checks that proof. The proof must be recent, within 60 seconds.

  5. Bob lands in Alice's workspace with access scoped to what Alice granted, and alice.syncropel.app is added to his list of workspaces.

Alice's audit trail shows Bob's identity and the access he was given.

Who may invite, and with what role

  • A member can invite when the owner has given them that ability, and confirms with their passkey first. Without it, the invite is refused.
  • An invite can only carry a role its maker holds. An owner can name invite roles (for example "crew" or "guest list"), and a member can make an invite only for a role they hold themselves.
  • An invite link sends guests only to your workspace's own web address: the addresses your workspace has declared, or your own machine on a self-hosted workspace. Any other address is refused when the invite is made, and ignored when it's opened.
  • A returning guest proves it's them. Joining again as an existing guest needs that guest's own invite or their device's key.
  • Revoking an invite ends its sign-ins: every session started from the invite ends with it.
CodeWhat it means
INVITE_CLASS_FORBIDDENThe invite names a role its maker doesn't hold.
INVITE_CLASS_UNDECLAREDThe invite names a role the owner hasn't declared.
STUDIO_URL_UNDECLAREDThe invite names a web address the workspace hasn't declared.
HOLDER_KEY_UNPROVENA returning guest couldn't prove it's the same guest.
SESSION_FORBIDDENThis person hasn't been given the ability to invite.

Revoke and audit

  • Revoke one invite: spl invite revoke <invite_id>. Revoking again is harmless and reports "already revoked".
  • Revoke in bulk: spl invite bulk-revoke expired or spl invite bulk-revoke exhausted clears every invite in that state.
  • See the history: spl invite audit lists every redeem (with who), every revoke (with who and why), and every refused redeem with its reason, such as expired, revoked, holder_type_mismatch, bad_proof or freshness_violation.

Renew a device's credential

A long-running device can renew its credential before it expires. Take the SHA-256 hash of the current credential to get its token_id, then call POST /v1/tokens/<token_id>/rotate with the current credential in the Authorization header. The response carries a new credential with a new expiry. A device can only renew its own credential.

Templates

If you keep creating the same kind of invite (for example, contributor access for 7 days, 5 uses), save it as a template with POST /v1/invite-templates and list your templates with spl invite templates. Templates persist across sessions.

What you can rely on

  • What a guest writes stays out of search. Search doesn't find what guests write, even for you. You can still read it in its conversation.
  • Two checks on every invite action. Creating an invite needs both an admin-level credential and permission to invite. An admin credential alone is not enough.
  • Colleague sign-in always needs proof. A colleague from another workspace must present a valid, recent proof signed by their own workspace. Otherwise the invite is refused and the refusal is recorded.
  • Nothing half-done. A redeem, revoke or refusal is always recorded in the audit trail together with the action itself.
  • Removing a federation pair signs out its colleagues. When you delete a federation pair, everyone who joined through it loses access at once.
  • Invite commands always need admin sign-in. Even if you turn authentication off for data endpoints, the invite endpoints (/v1/invites, /v1/invites/audit, /v1/invites/bulk-revoke, /v1/invite-templates, /v1/tokens/*/rotate) refuse anonymous callers.

Reference

On this page