Calls · POST
callsRtcToken
Calls (beta): a temporary key for browsers and apps, so you never put apiTokenInstance in front-end code.
Endpoint
POST https://flowapi.pro/waInstance{idInstance}/callsRtcToken/{apiTokenInstance}Request body
{
"ttlSeconds": 3600
}Example
curl -X POST "https://flowapi.pro/waInstance{idInstance}/callsRtcToken/{apiTokenInstance}" \
-H "Content-Type: application/json" \
-d '{"ttlSeconds":3600}'Response
{
"token": "rtc_3f9c…",
"expiresAt": 1795300000,
"expiresIn": 3600,
"wsUrl": "wss://flowapi.pro/waInstance{idInstance}/callsRtc/rtc_3f9c…"
}Notes
- ttlSeconds: 60 to 86400, default 3600.
- Use the key in place of apiTokenInstance for callsRtc, callsState, callsGetIceServers, callsDeviceState, callsDial, callsAccept, callsReject and callsHangUp. Other methods return 403.
- An open callsRtc WebSocket stays open after the key expires. On 401, ask for a new key.
- Cancel a key early with {"revoke":"rtc_…"}.
More calls methods
Try it on your own number
7 days free, no credit card. Then $10 per number per month.