oEmbed
SnipShare is a standards-compliant oEmbed provider. Any oEmbed-aware consumer can turn a paste URL into a rich embed, and WordPress itself will auto-embed paste URLs pasted into post content, BuddyPress activity, or bbPress topics and replies.
Endpoint
Section titled “Endpoint”GET /wp-json/snipshare/v1/oembed?url={paste_url}&format=json| Parameter | Default | Notes |
|---|---|---|
url |
(required) | The paste page URL to embed. |
format |
json |
Only json is supported. |
maxwidth |
600 | Clamped to a 300–800 px range. |
maxheight |
400 | Present for spec compliance; the height is calculated from the paste’s line count. |
Response
Section titled “Response”Returns an oEmbed 1.0 rich object with version, type, provider_name, provider_url, title, author_name, author_url, html, width, and height. The html is an <iframe> pointing at the paste’s embed view (/paste/{hash}/?embed=true) plus a link back to the full paste.
Discovery
Section titled “Discovery”On a single paste page, SnipShare injects an oEmbed discovery <link> into the document <head>, so consumers can discover embed metadata from the paste URL without prior configuration.
SnipShare also registers itself with WordPress’s provider list (wp_oembed_add_provider) for /paste/{hash} URLs, which is what enables automatic embedding inside post content and community activity.
Visibility
Section titled “Visibility”Only active public and unlisted pastes are embeddable. Private pastes return a 404 from the oEmbed endpoint and never render an embed.

