API reference
The addresses anyone can call from outside CrowOn, with no account. All of them only read; nothing here posts or changes anything.
The app's own /api/… calls need a signed-in session and are internal, so they aren't listed. A public API for posting, login and more is in preparation.
The example responses are real calls made with a test account.
https://crowon.appGET /oembedGET /embed/{id}GET /embed.jsGET /s/p/{id}GET /s/v/{id}GET /s/u/{handle}GET /@{handle}Authentication
No key or token is needed. Any site can call these (/oembed and /embed.js send Access-Control-Allow-Origin: *).
Only posts that are public to everyone, from people who allow embeds, are shown.
curl "https://crowon.app/oembed?url=https://crowon.app/s/p/p-8f3a21c7d09e"Errors
/oembed answers errors with an error in JSON.
Codes
404not_found- No such post, it can't be embedded (not public to everyone, embeds off, deleted or hidden), or the address isn't CrowOn's
501json_onlyformatwas something other thanjson
{"error":"not_found"}{"error":"json_only"}oEmbed
GET /oembed
Returns the embed code for a post or video link (oEmbed 1.0, rich). Discoverable from the <link rel="alternate" type="application/json+oembed"> on share link pages.
Parameters
urlstringRequired- A
/s/p/…,/s/v/…or/embed/…link, or the app address/#/p/… maxwidthinteger- 240–540, 540 by default
formatstringjsononly
Returns
The embed code (html), the author, and a thumbnail when the post has a photo or video. Cached for an hour.
curl "https://crowon.app/oembed?url=https://crowon.app/s/p/p-8f3a21c7d09e&maxwidth=540"{ "version": "1.0", "type": "rich", "provider_name": "CrowOn", "provider_url": "https://crowon.app", "title": "Morning light at the station.", "author_name": "Mika Sato", "author_url": "https://crowon.app/@mika.sato", "html": "<blockquote class=\"crowon-embed\" data-post=\"p-8f3a21c7d09e\" style=\"max-width:540px;margin:0 auto\"><a href=\"https://crowon.app/s/p/p-8f3a21c7d09e\">View this post on CrowOn</a></blockquote><script async src=\"https://crowon.app/embed.js\"></script><noscript><iframe src=\"https://crowon.app/embed/p-8f3a21c7d09e\" width=\"540\" height=\"640\" style=\"border:0;max-width:100%\" loading=\"lazy\" title=\"CrowOn\"></iframe></noscript>", "width": 540, "height": 220, "cache_age": 3600}Embed card
GET /embed/{id}
The post as a single card in HTML. On CrowOn, this is the only address another site may put in an iframe.
Parameters
idstringRequired- The post or video ID (in the path)
themestringlightordark. Follows the viewer's device by default
Returns
The card's HTML. A post that can't be shown returns 404 with a "This post isn't available" card. Cached for a minute.
curl -i https://crowon.app/embed/p-8f3a21c7d09eHTTP/1.1 200 OKContent-Type: text/html; charset=utf-8Cache-Control: public, max-age=60Content-Security-Policy: default-src 'none'; … frame-ancestors * <!doctype html><html lang="en"><head>…<title>CrowOn</title>…Embed script
GET /embed.js
Replaces each blockquote.crowon-embed on the page with an iframe of /embed/{id} and keeps it as tall as the card. Load it once, however many posts the page has.
Parameters
data-postattributeRequired- The post ID
data-themeattributelightordark
<blockquote class="crowon-embed" data-post="p-8f3a21c7d09e" data-theme="dark"> <a href="https://crowon.app/s/p/p-8f3a21c7d09e">View this post on CrowOn</a></blockquote><script async src="https://crowon.app/embed.js"></script>HTTP/1.1 200 OKContent-Type: text/javascript; charset=utf-8Cache-Control: public, max-age=86400Access-Control-Allow-Origin: *Link page
GET /@{handle}
A page showing the links a person added, to anyone, with no account. Links go through /l/… so taps can be counted.
Parameters
handlestringRequired- The username (in the path)
Returns
The link page's HTML (og:type profile).
curl https://crowon.app/@mika.sato<meta property="og:site_name" content="CrowOn"><meta property="og:type" content="profile"><meta property="og:title" content="Mika Sato(@mika.sato)"><meta property="og:description" content="Photos from walks around the city."><meta property="og:url" content="https://crowon.app/@mika.sato"><meta name="twitter:card" content="summary">