# Embedding & Integrations Integrate Ackify into your tools (Notion, Outline, Google Docs, etc.). ## Integration Methods ### 1. Direct Link The simplest: ``` https://sign.company.com/?doc=policy_2025 ``` **Usage**: - Email - Chat (Slack, Teams) - Wiki - Documentation **Behavior**: - User clicks → Arrives at signature page - Logs in via OAuth2 - Signs the document ### 2. iFrame Embed To integrate in a web page: ```html ``` **Render**: ``` ┌─────────────────────────────────────┐ │ 📄 Security Policy 2025 │ │ 42 confirmations │ │ [Sign this document] │ └─────────────────────────────────────┘ ``` ### 3. oEmbed (Auto-discovery) For platforms supporting oEmbed (Notion, Outline, Confluence, etc.). #### How it works 1. Paste URL in your editor: ``` https://sign.company.com/?doc=policy_2025 ``` 2. Editor auto-detects via meta tag: ```html ``` 3. Editor calls `/oembed` and receives: ```json { "type": "rich", "version": "1.0", "title": "Security Policy 2025 - 42 confirmations", "provider_name": "Ackify", "html": "", "width": null, "height": 200 } ``` ### Parameters | Parameter | Description | Example | |-----------|-------------|---------| | `url` | Document URL (required) | `?url=https://...` | | `maxwidth` | Max width (optional) | `?maxwidth=800` | | `maxheight` | Max height (optional) | `?maxheight=300` | ### Discovery All pages include discovery tag: ```html ``` ## Customization ### Dark Mode Theme Widget automatically detects browser's dark mode: ```css @media (prefers-color-scheme: dark) { /* Automatic dark theme */ } ``` ### Custom Size ```html ``` ### Language Widget automatically detects browser language: - `fr` - Français - `en` - English - `es` - Español - `de` - Deutsch - `it` - Italiano ## Security ### iFrame Sandboxing By default, Ackify iframes allow: - `allow-same-origin` - OAuth2 cookies - `allow-scripts` - Vue.js features - `allow-forms` - Signature submission - `allow-popups` - OAuth redirect ### CORS Ackify automatically configures CORS for: - All origins (public reading) - Credentials via `Access-Control-Allow-Credentials` ### CSP Content Security Policy headers configured to allow embedding: ``` X-Frame-Options: SAMEORIGIN Content-Security-Policy: frame-ancestors 'self' https://notion.so https://outline.com ``` ## Troubleshooting ### iframe not displaying Verify: - HTTPS enabled (required for OAuth) - CSP headers allow embedding - No content blocker (uBlock, Privacy Badger) ### oEmbed not detected Verify: - Tag `` is present - URL is exact (with `?doc=...`) - Platform supports oEmbed discovery ### Slack preview empty Verify: - Open Graph meta tags present - URL publicly accessible - No infinite redirect ## Complete Examples See: - [docs/integrations/google-doc/](../integrations/google-doc/) - Google Workspace integration - More examples coming...