PageSourceSearch

https://wafly.io/assets/InternationalDocs-CtOqfDAA.js

js wafly.io collected 2026-10-05 02:40:43 UTC 7,063 bytes, 9 lines download raw bytes

1import{F as p,j as e,T as x,bd as h,ab as b,B as i,aq as u,f as c,o as f}from"./index-CcfyUbhu.js";import{L as g}from"./Layout-Cqb3e_Sy.js";import{K as j}from"./key-round-Bl_f--qt.js";import{C as y}from"./copy-DhK4-Keu.js";import"./badge-CQLlXhon.js";import"./separator-DAWqHvnE.js";import"./shield-BJKF7xps.js";const N={es:{docs:"Documentación de la API",intro:"Integra Wafly mediante REST y recibe eventos con webhooks.",back:"Volver al sitio",start:"Inicio rápido",steps:["Crea una cuenta y una instancia","Conecta el número mediante QR o código","Copia instance, token y Client-Token","Envía tu primera solicitud"],base:"URL base",auth:"Autenticación",authBody:"Las credenciales de la instancia forman parte de la ruta. El Client-Token identifica tu cuenta cuando el endpoint lo exige.",example:"Enviar un mensaje de texto",webhooks:"Recibir mensajes por webhook",webhookBody:"Registra una URL HTTPS pública. Wafly enviará los eventos de mensajes recibidos a esa dirección.",references:"Referencia completa",openapi:"Abrir OpenAPI 3.1",public:"Documentación pública · 100 endpoints",copy:"Copiar",copied:"Copiado"},pt:{docs:"Documentação da API",intro:"Integre a Wafly através de REST e receba eventos com webhooks.",back:"Voltar ao site",start:"Início rápido",steps:["Crie uma conta e uma instância","Ligue o número através de QR ou código","Copie instance, token e Client-Token","Faça o primeiro pedido"],base:"URL base",auth:"Autenticação",authBody:"As credenciais da instância fazem parte do caminho. O Client-Token identifica a sua conta quando o endpoint o exige.",example:"Enviar uma mensagem de texto",webhooks:"Receber mensagens por webhook",webhookBody:"Registe um endereço HTTPS público. A Wafly enviará os eventos de mensagens recebidas para esse endereço.",references:"Referência completa",openapi:"Abrir OpenAPI 3.1",public:"Documentação pública · 100 endpoints",copy:"Copiar",copied:"Copiado"},en:{docs:"API documentation",intro:"Integrate Wafly through REST and receive events with webhooks.",back:"Back to website",start:"Quick start",steps:["Create an account and an instance","Connect the number by QR or pairing code","Copy instance, token and Client-Token","Send your first request"],base:"Base URL",auth:"Authentication",authBody:"Instance credentials are part of the path. Client-Token identifies your account when an endpoint requires it.",example:"Send a text message",webhooks:"Receive messages by webhook",webhookBody:"Register a public HTTPS URL. Wafly will send received-message events to that address.",references:"Complete reference",openapi:"Open OpenAPI 3.1",public:"Public documentation · 100 endpoints",copy:"Copy",copied:"Copied"}};function O({embedded:o=!1}){const t=p(),a=N[t.language],s="https://wafly.io/api-bridge-whats",l=`curl -X POST \\
2  "${s}/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-text" \\
3  -H "Client-Token: YOUR_CLIENT_TOKEN" \\
4  -H "Content-Type: application/json" \\
5  -d '{"phone":"${t.phoneExample}","message":"Hello from Wafly"}'`,d=`curl -X PUT \\
6  "${s}/instances/YOUR_INSTANCE/token/YOUR_TOKEN/update-webhook-received" \\
7  -H "Client-Token: YOUR_CLIENT_TOKEN" \\
8  -H "Content-Type: application/json" \\
9  -d '{"value":"https://your-system.com/webhooks/whatsapp"}'`,n=e.jsxs("main",{className:`mx-auto max-w-5xl ${o?"py-4":"px-4 py-12 sm:px-6 lg:px-8"}`,children:[e.jsxs("p",{className:"text-xs font-bold uppercase tracking-[0.16em] text-primary",children:[t.flag," ",a.public]}),e.jsx("h1",{className:"mt-3 text-4xl font-bold tracking-tight",children:a.docs}),e.jsx("p",{className:"mt-4 max-w-2xl text-lg text-muted-foreground",children:a.intro}),e.jsxs("section",{className:"mt-10 grid gap-5 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[e.jsx(x,{className:"h-6 w-6 text-primary"}),e.jsx("h2",{className:"mt-4 text-xl font-bold",children:a.start}),e.jsx("ol",{className:"mt-4 space-y-3",children:a.steps.map((r,m)=>e.jsxs("li",{className:"flex gap-3 text-sm",children:[e.jsx("span",{className:"flex h-6 w-6 flex-none items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary",children:m+1}),r]},r))})]}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[e.jsx(j,{className:"h-6 w-6 text-primary"}),e.jsx("h2",{className:"mt-4 text-xl font-bold",children:a.auth}),e.jsx("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground",children:a.authBody}),e.jsx("p",{className:"mt-5 text-xs font-bold uppercase text-muted-foreground",children:a.base}),e.jsx("code",{className:"mt-2 block overflow-x-auto rounded-lg bg-slate-950 p-3 text-xs text-emerald-300",children:s})]})]}),e.jsx(k,{title:a.example,icon:e.jsx(h,{className:"h-5 w-5"}),code:l,label:a.copy}),e.jsxs("section",{className:"mt-6 rounded-2xl border border-border bg-card p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[e.jsx(b,{className:"h-5 w-5"}),e.jsx("h2",{className:"text-xl font-bold text-foreground",children:a.webhooks})]}),e.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:a.webhookBody}),e.jsx("pre",{className:"mt-5 overflow-x-auto rounded-xl bg-slate-950 p-5 text-xs leading-6 text-slate-200",children:e.jsx("code",{children:d})})]}),e.jsxs("section",{className:"mt-6 rounded-2xl border border-primary/20 bg-primary/[0.05] p-6",children:[e.jsx("h2",{className:"text-xl font-bold",children:a.references}),e.jsx("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row",children:e.jsx(i,{variant:"outline",asChild:!0,children:e.jsxs("a",{href:"/openapi.json",target:"_blank",rel:"noreferrer",children:[a.openapi,e.jsx(u,{className:"ml-2 h-4 w-4"})]})})})]})]});return o?e.jsx(g,{children:n}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b border-border bg-card",children:e.jsxs("div",{className:"mx-auto flex h-16 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8",children:[e.jsxs(c,{to:t.route,className:"flex items-center gap-2",children:[e.jsx("img",{src:"/logo.png",alt:"",className:"h-8 w-8"}),e.jsx("span",{className:"font-bold",children:"Wafly Docs"})]}),e.jsx(i,{variant:"ghost",asChild:!0,children:e.jsxs(c,{to:t.route,children:[e.jsx(f,{className:"mr-2 h-4 w-4"}),a.back]})})]})}),n]})}function k({title:o,icon:t,code:a,label:s}){return e.jsxs("section",{className:"mt-6 rounded-2xl border border-border bg-card p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[t,e.jsx("h2",{className:"text-xl font-bold text-foreground",children:o})]}),e.jsxs("div",{className:"relative mt-5",children:[e.jsx("pre",{className:"overflow-x-auto rounded-xl bg-slate-950 p-5 pr-14 text-xs leading-6 text-slate-200",children:e.jsx("code",{children:a})}),e.jsx("button",{type:"button",onClick:()=>navigator.clipboard.writeText(a),className:"absolute right-3 top-3 rounded-lg border border-white/15 bg-white/10 p-2 text-white","aria-label":s,children:e.jsx(y,{className:"h-4 w-4"})})]})]})}export{O as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.