Try your own app
Connect to your app with its own keys, join a channel and send events, before you write a line of backend code.
What you type stays in this browser. The join token is signed here, and your keys are never sent to pikoman.se or stored: reloading the page forgets them. If you feel unsure afterwards, you are welcome to replace the app's signing key in the dashboard; the old one stops working within half a minute.
In the channel
From your backend
These go through the HTTP API, signed with an API key that belongs on a server. Make a 10-minute token in the
dashboard, put it in $PIKOMAN_TOKEN and run them in a terminal, or
import openapi.json into Postman. How
tokens work.
How it works
In a real app your backend signs the join token, so the private key never reaches a browser. Here the page
does it with OfflineAuthenticator, which is meant for exactly this: trying things out, and
programs that are the app's own backend.
Nothing you type is stored or sent to pikoman.se. The only connection is the WebSocket to
next.pikoman.se, the same one your users' browsers open.
import Pikoman, { OfflineAuthenticator } from "@pikoman/ws";
const pikoman = new Pikoman(appId);
const auth = new OfflineAuthenticator({ name }, privateKeyPem, 3);
const channel = pikoman.listenPresence("presence-playground", auth);
channel.members((members) => render(members));
channel.clientMessage((from, event, data) => log(from, event, data));
channel.send("hello", { text: "Hi" });