Skip to main content
← All guides

Share an API key or a 1Password link with one person

Why qURL here

The secret stays in a file on your computer and opens only for the person you invited, after they verify their email and save a passkey, so it never sits in a chat, an inbox or a pasted note. You delete the resource and the file when it has arrived, and nothing is left to find.

Steps

Save the secret in its own file, serve that folder on 127.0.0.1, and publish it invite-only with qURL™ under a neutral name. Invite the person by email: they verify that address and save a passkey before they can open the file, so a forwarded email gets nobody else in. No email address? Publish without invite-only and send one single-use link. When they have it, delete the resource, stop the server and remove the file.

  1. Install the qURL CLI

    On macOS, install it with Homebrew. On Linux and Windows, download the package for your platform from the latest release; the CLI page lists each one. Nothing asks you to sign up.

    brew install layervai/tap/qurl
    qurl --version

    Check: qurl --version prints 4.0.0 or later. If it is older, update the CLI before you go on.

  2. Put the secret in a folder of its own

    Copy the API key, the password or the 1Password share link to your clipboard first. On a Mac, pbpaste writes it to the file without it appearing in your terminal or its history; elsewhere, save the file with a text editor. The server lists everything in this folder, so keep it to this one file.

    mkdir -m 700 ~/one-secret && cd ~/one-secret
    pbpaste > secret.txt
    ls

    Check: The listing shows secret.txt and nothing else.

  3. Serve the folder on 127.0.0.1

    Run this in the folder and keep it running in its own terminal. It listens only on this machine: qURL connects to it there, so nothing opens on your network.

    python3 -m http.server 8765 --bind 127.0.0.1

    Check: In a second terminal, curl --fail -o /dev/null http://127.0.0.1:8765/secret.txt exits without an error.

  4. Publish it invite-only, with a neutral name

    Invite-only means only the email addresses you invite can open it, and nobody else can ask. The name is public text, so it must never describe the secret. No email address for the person? Skip to the single-use link below instead.

    qurl publish http://127.0.0.1:8765 \
      --access invite_only --name "Shared note" -o json

    Check: The reply says private: true and its consumer_access names the invite-only policy. Save the CRID it prints.

  5. Confirm it is serving

    A successful publish does not prove the route is up. Read the resource’s status before you invite anyone.

    qurl status <CRID> -o json

    Check: connection_state is "serving". For any other state, run qurl inspect <CRID> -o json to see why.

  6. Check the address as a stranger

    Open https://qurl.link/<CRID> in a private window, with your CRID in place of <CRID>.

    Check: You see the name “Shared note” and “This is invite-only”, with no way to ask for access and no file.

  7. Invite the one person

    Use the email address they will check today. They open the emailed invitation, verify their email and save a passkey, then open secret.txt and copy the secret. Their email verification code stays in that browser; they never send it to you. Tell them in a direct message to expect the email.

    qurl access invite <CRID> --email ana@example.com -o json

    Check: The reply shows the invitation with status open and delivery accepted. Accepted means the email was sent, not that they have opened it: ask them to tell you once they have copied the secret.

  8. Received? Delete everything

    Delete the resource, stop the server with Ctrl-C in its terminal, and remove the folder. Deleting the resource also ends the invitation.

    qurl delete <CRID> --yes
    rm -r ~/one-secret

    Check: A later qurl status <CRID> answers “Resource Revoked”, and ~/one-secret no longer exists.

What the recipient sees

With an invitation, the person opens the email in a browser, verifies their address and saves a passkey, then sees a list with one file, secret.txt.

More

They open it and copy the secret. With a single-use link, they open the link and see the same one-file list; opening it again shows “Access link invalid”. Nothing to install and no account to create either way.

Troubleshooting

Troubleshooting
If you seeDo this
The invitation email has not arrivedAsk them to check spam for the address you invited. Run qurl access list_invitations <CRID> -o json to confirm the address and that delivery was accepted. If the address was wrong, invite the right one; the wrong one can still enrol, so remove it with qurl access revoke_invitation, or delete the resource and start again.
With a single-use link, the person sees “Access link invalid” the first time they open itThe link was opened before them, perhaps by a link preview or a scanner, or it expired. Treat the secret as exposed: delete the resource, change the secret, and send the new one in a direct message.
Show 5 more fixes
More troubleshooting
If you seeDo this
The person sees “Resource not found”The resource was deleted before they opened it. Publish the folder again and invite them again, or send a new link.
The person sees a list of more files than secret.txtThe server was started in another folder. Stop it, delete the resource, and start again from step 2 in a new, empty folder.
qurl publish cannot connect to the server on 127.0.0.1Start the server from step 3 first and keep it running, then check it with curl on the same address and port.
qurl status does not report connection_state "serving"Run qurl inspect <CRID> -o json for the reason. Check that the server still answers on 127.0.0.1 with curl, then run qurl start <CRID>.
publish says “Quota Exceeded” or that a plan limit is reachedRun qurl list --status active, then qurl delete <CRID> for any resource you no longer need. qurl stop keeps the resource, so it does not free a slot.

Frequently Asked Questions

How do I share an API key securely with a teammate?

Save it in a file of its own, serve the folder on 127.0.0.1, publish it invite-only with qurl publish, and invite your teammate’s email with qurl access invite. Delete the resource and the file once they have it, and rotate the key if anything looked wrong.

Why invite by email instead of sending a link?

An invitation opens only for the person who verifies that email address and saves a passkey, so a forwarded email or a link preview gets nobody else in. A single-use link is quicker and needs nothing from them, but whoever opens it first gets the secret. Use the link when you don’t have their email.

Can I send a 1Password share link this way?

Yes. The 1Password share link is the secret you save in the file. Set its expiry in 1Password, and enter the recipient’s email there if you know it, then delete the link in 1Password once they have opened the item.

Can a coding agent do this without seeing the secret?

Yes, if you save the file yourself. The agent prompt above tells the agent not to read or print secret.txt: it only serves the folder, publishes it, sends the invitation and cleans up.

What if someone else opens a single-use link first?

They get the secret, and your recipient sees “Access link invalid”. A single-use link admits whoever opens it first, so treat the secret as exposed: change it, and send the new one in a direct message.

Who else can open the secret while a single-use link is live?

The link admits whoever opens it first. Opening it in a browser starts a session for that browser, and another browser on the same public IP cannot use its access. A script or agent that opens the link without a browser is admitted by its network address instead, which other devices on that public IP share until the session ends.

Can the person open the secret again later?

With an invitation, yes: they come back with the same passkey until you delete the resource. With a single-use link, their browser keeps access for up to five minutes after the first open, the session length set with --session-duration; opening the same link again shows “Access link invalid”.

Invite the one person

After the folder is served and published invite-only, invite the person who should get the secret.

Or use the CLI →

Book a pilot

Tell us what to hide. We’ll scope a pilot.

Enterprise starts with a paid pilot on one application, typically 60 to 90 days, credited in full toward year one if you convert within 60 days. After that, an annual package sized to what you protect, not per seat.