Integrations
Make LinkOpen links without opening the site. There’s a small API, a link that opens the converter with your link filled in, and recipes for Apple Shortcuts, Raycast and the shell. They all follow the same rules as the converter.
API
Send an app link to GET /api/link and get the https link back as plain text:
curl -G https://linkopen.app/api/link \
--data-urlencode 'url=obsidian://open?vault=Notes&file=Projects%2FRoadmap'https://linkopen.app/s/1kAHDkPYC4KYM6PAHAFATmAVlAxhGBSATAGIBKYAhgCYC2pADkA| Parameter | Values | Notes |
|---|---|---|
| url | required | The app link, up to 2048 characters. URL-encode it; curl’s --data-urlencode does that for you. |
| mode | auto | manual | auto (the default) opens the app as soon as the link is clicked. manual shows a page with an Open link button first. Links to websites (http, https) always come back as manual. |
| format | text | json | text (the default) returns just the link. json returns {"link", "url", "mode"}, where mode is the one the link actually got. |
A manual link, as JSON:
curl -G https://linkopen.app/api/link \
--data-urlencode 'url=slack://channel?team=T0001&id=C0001' \
-d mode=manual -d format=json{"link":"https://linkopen.app/0/slack%3A%2F%2Fchannel%3Fteam%3DT0001%26id%3DC0001","url":"slack://channel?team=T0001&id=C0001","mode":"manual"}Errors come back as status 400 with a short message, or as {"error": "…"} with format=json. That happens when url is missing, has no scheme, is longer than 2048 characters, or uses javascript:, data: or vbscript:, which LinkOpen refuses.
Responses send Access-Control-Allow-Origin: *, so a web page on any site can call the API with fetch. Successful responses may be cached for a day. The API doesn’t save the URL; the link is worked out from it on each request.
const params = new URLSearchParams({ url: 'obsidian://open?vault=Notes&file=Roadmap' })
const res = await fetch(`https://linkopen.app/api/link?${params}`)
const link = await res.text()Prefill link
To send someone to the converter with a link already filled in, put the app link in ?url=, URL-encoded:
https://linkopen.app/?url=obsidian%3A%2F%2Fopen%3Fvault%3DNotes%26file%3DProjects%252FRoadmapAdd &mode=manual to turn off auto-redirect. Encode the whole app link: an unencoded & inside it would cut it short.
Apple Shortcuts
A shortcut for iPhone and iPad that takes an app link from the share sheet, or from the clipboard when nothing was shared, and copies the https link.
- In the Shortcuts app, create a shortcut. Open its Details and turn on Show in Share Sheet. An input action appears at the top.
- In the input action, tap Any and keep only text and URLs. Then tap Continue in the same action and choose Get Clipboard.
- Add the action that URL-encodes text (search the actions for “encode”) and give it the shortcut’s input.
- Add a URL action:
https://linkopen.app/api/link?url=followed by the encoded text from step 3. For links that ask first, add&mode=manualat the end. - Add Get Contents of URL. It calls the URL from step 4 and gets the link back.
- Add Copy to Clipboard.
Use it from the share sheet on a selected app link, or copy an app link and run the shortcut from the Shortcuts app.
Raycast
A Script Command for Raycast on a Mac. Save it as linkopen.sh in a folder of its own. In Raycast settings, open Extensions, click the plus button, choose Add Script Directory and pick that folder.
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Copy LinkOpen Link
# @raycast.mode silent
# Optional parameters:
# @raycast.packageName LinkOpen
# @raycast.argument1 { "type": "text", "placeholder": "App link" }
# Documentation:
# @raycast.description Turn an app link into an https link and copy it.
link=$(curl -sS -G https://linkopen.app/api/link --data-urlencode "url=$1")
case "$link" in
https://*)
printf '%s' "$link" | pbcopy
echo "Copied $link"
;;
*)
echo "$link"
exit 1
;;
esacRun Copy LinkOpen Link, paste an app link, press Enter, and the https link is on your clipboard. If Raycast can’t run the script, make it executable with chmod +x linkopen.sh.
Shell
For macOS and Linux. Add this to ~/.zshrc or ~/.bashrc:
# Usage: linkopen 'obsidian://open?vault=Notes&file=Roadmap' [manual]
linkopen() {
local link
link=$(curl -sS -G https://linkopen.app/api/link \
--data-urlencode "url=$1" \
--data-urlencode "mode=${2:-auto}") || return 1
case "$link" in
https://*) ;;
*) echo "linkopen: $link" >&2; return 1 ;;
esac
if [ -t 1 ]; then echo "$link"; else printf '%s' "$link"; fi
}linkopen 'obsidian://open?vault=Notes&file=Roadmap'
linkopen 'slack://channel?team=T0001&id=C0001' manual
linkopen 'zoommtg://zoom.us/join?action=join&confno=123456789' | pbcopyKeep the app link in single quotes so the shell leaves & and ? alone. When piped, the output has no trailing newline, so pbcopy on macOS, or xclip -selection clipboard or wl-copy on Linux, copies just the link.
Obsidian
The LinkOpen plugin for Obsidian adds three commands: copy a link to the current note, to the heading or block under the cursor, or a Markdown link to the note. It also adds a “Copy LinkOpen link” item to the file menu. Links are built on your device; the plugin makes no network calls.
Install it from Obsidian’s community plugins: open Settings › Community plugins, select Browse and search for LinkOpen. It also has a page in the community directory. The source is at github.com/inlife/obsidian-linkopen. For more on the links themselves, see Sharing Obsidian links.