Inicio rápido
Envía tu primera notificación push en tres pasos.
1. Inicia un grupo de push
group es el nombre que ve la gente. pushGroupId es cualquier texto que identifique el grupo. Envía el mismo valor en cada llamada posterior.
1 2 3 4 5 6 7 8 9 10 11 12
curl -X POST https://api.webliveactivity.com/api/push/start \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "group": "Acme Orders", "pushGroupId": "acme-orders", "reuse": true, "brand": { "name": "Acme", "logo": "https://acme.example/logo.png" } }'
La respuesta (201) trae links.iframe, el botón para unirse. Consulta POST /api/push/start.
1 2 3 4 5 6 7 8
{ "ok": true, "groupId": "pg-7hk3mzq2wd9x", "pushGroupId": "acme-orders", "links": { "iframe": "<iframe src=\"https://api.webliveactivity.com/embed/button?type=notify&userId=pg-7hk3mzq2wd9x\" width=\"340\" height=\"95\" style=\"border:0;color-scheme:light\"></iframe>" } }
2. Deja que los usuarios se unan
Pega links.iframe en una página web. En un móvil, un toque une al grupo. En un ordenador, un clic muestra un código QR para escanear con la cámara del móvil. Para cambiar su color o usarlo en una página oscura, consulta el botón de lanzamiento.
3. Envía una notificación
Todos los teléfonos del grupo la reciben. Consulta POST /api/push/send.
1 2 3 4 5 6 7 8 9 10 11
curl -X POST https://api.webliveactivity.com/api/push/send \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "pushGroupId": "acme-orders", "title": "Your order shipped!", "subtitle": "Order #1234", "message": "Your package is on the way. Expected delivery: tomorrow by 5 PM.", "imageUrl": "https://acme.example/shipped.webp", "actionURL": "https://acme.example/orders/1234" }'
La respuesta da targeted, el número de teléfonos a los que se ha enviado. Es 0 hasta que alguien se une, y entonces no se factura nada.









