flow api
Calls · POST

callsRtcToken

Calls (beta): a temporary key for browsers and apps, so you never put apiTokenInstance in front-end code.

Video walkthrough: callsRtcToken · 15 seconds · click the bar to jump to a step

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_…"}.
Green API compatible. callsRtcToken uses the same name, request body and response as Green API, so existing code works after you change the host to flowapi.pro. Errors: 401 wrong instance or token, 402 trial ended or number not covered by your plan, 429 rate limit reached (wait the seconds in the Retry-After header), 400 with a message for anything else.

More calls methods

Try it on your own number

7 days free, no credit card. Then $10 per number per month.

Start free trial