Skip to content
InfiQ glossary · Reference sheetBots, flows & AI

Interactive Flow Token

The flow_token string a business sets when it sends a WhatsApp Flow and gets back on every endpoint call and on completion, used to tie the session to a record.

Properties

Term
Interactive Flow Token
Abbreviation
None
Level
Expert
Audience
Developers
Reviewed
Also called
flow_token · Flow token · WhatsApp Flow token

01 · Definition

What is the Flow token (flow_token)?

An interactive Flow token — the flow_token parameter of the WhatsApp Business Platform — is a string your business generates and attaches when it sends a WhatsApp Flow. WhatsApp carries it unchanged to the user's device and hands it back at every point where the Flow talks to your systems: in each decrypted INIT, BACK and data_exchange request to your Flow endpoint, in the endpoint's final completion response, and inside the nfm_reply Flow response message your webhook receives when the user submits.

Meta's documentation compares it to a session identifier in a web application, and asks that it be generated so it cannot be predicted. It is required on every endpoint request and in the completion response; on a message template's Flow button it is optional and defaults to the literal string unused — which is exactly why you should always set your own. Meta never interprets the value, so its meaning lives entirely in your database: a random ID that maps to a booking draft, a lead or a KYC case, with an owner, a status and an expiry.

A Flow token is not an authentication credential. It travels through the user's phone, so it proves nothing about who is calling — that job belongs to the X-Hub-Signature-256 signature and the RSA/AES-GCM encryption on Flow endpoint traffic. What the token does is let you refuse the wrong session: an unknown, expired or already-completed token gets HTTP 427, and WhatsApp shows the user a generic error and disables that message's Flow button.

Key takeaways

  • The flow_token is a string your business sets when sending a WhatsApp Flow and gets back on every endpoint call and in the final nfm_reply.
  • It is a correlation key, like a web session ID, not a credential: endpoint requests are authenticated by signature and encryption.
  • Mint a fresh, unguessable token per send; on a template's Flow button an omitted token defaults to the string unused.
  • Answer an unknown, expired or already-used token with HTTP 427 and WhatsApp disables that Flow's button for the user.
  • Mark the token consumed when the completion webhook arrives, so a retried delivery is processed only once.

See InfiQ pricing

02How does InfiQ help with the Flow token (flow_token)?

When InfiQ sends a WhatsApp Flow, the session is tied back to the right customer and conversation, so every answer lands on the correct contact without you tracking tokens yourself.

WhatsApp Flows on InfiQ

03 · Specifications

The Flow token (flow_token): key facts and limits

Generated byYour business, once per Flow send
Returned inINIT, BACK and data_exchange requests; completion params; nfm_reply response_json
Template Flow button defaultThe string unused, if you omit it
Stale or unknown tokenRespond HTTP 427 (optional error_msg)
Related endpoint codes421 decryption failed · 432 signature check failed
What it is notAn auth credential or a place for personal data

04 · Code samples

The Flow token (flow_token) in code

curl -X POST "https://api.infiq.in/v1/messages" \
-H "X-INFIQ-API-KEY: {INFIQ_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "919812345678",
"type": "interactive",
"interactive": {
"type": "flow",
"header": { "type": "text", "text": "Home sample collection" },
"body": { "text": "Pick a slot and confirm your address." },
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "ftk_bk_7Q2mX9vLr4TzN8aP",
"flow_id": "{FLOW_ID}",
"flow_cta": "Book a slot",
"flow_action": "data_exchange"
}
}
}
}'

With flow_action set to data_exchange, WhatsApp asks your endpoint for the first screen (INIT) — and that request already carries the token.

05Playground

A working model of Interactive Flow Token. Use its controls to replay it step by step.

Follow one flow_token through a Flow

9 / 9
{
"send": {
"type": "interactive",
"interactive": {
"type": "flow",
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "ftk_bk_7Q2mX9vLr4TzN8aP",
"flow_id": "1187310946503222",
"flow_cta": "Book a slot",
"flow_action": "data_exchange"
}
}
}
},
"endpoint_request": {
"version": "3.0",
"action": "data_exchange",
"screen": "SLOTS",
"data": {
"slot_id": "2026-10-21T08:00+05:30"
},
"flow_token": "ftk_bk_7Q2mX9vLr4TzN8aP"
},
"endpoint_complete": {
"screen": "SUCCESS",
"data": {
"extension_message_response": {
"params": {
"flow_token": "ftk_bk_7Q2mX9vLr4TzN8aP",
"booking_ref": "HSC-48213"
}
}
}
},
"webhook": {
"from": "919812345678",
"id": "wamid.HBgMOTE5ODEyMzQ1Njc4FQIAEhgUM0EwRkI4QzE",
"type": "interactive",
"interactive": {
"type": "nfm_reply",
"nfm_reply": {
"name": "flow",
"body": "Sent",
"response_json": "{\"flow_token\":\"ftk_bk_7Q2mX9vLr4TzN8aP\",\"booking_ref\":\"HSC-48213\"}"
}
}
}
}
Four real-shaped payloads stacked into one document — the send, a decrypted endpoint request, the completion response and the nfm_reply webhook. Step through to see the same token appear in each.

Field 9: webhook.from — Check the sender matches the WhatsApp user the token was minted for.

06 · Operation

How does the Flow token (flow_token) work?

  1. Mint a fresh token for each send

    Generate a random, unguessable value (for example 128 bits from a cryptographic generator, optionally behind a readable prefix) and store a row with the token, the recipient's WhatsApp ID, the purpose, a status of pending and an expiry.

  2. Attach it to the Flow message

    Put it in interactive.action.parameters.flow_token for an interactive Flow message, or in the button component's parameters[0].action.flow_token when the Flow is opened from an approved template.

  3. Resolve it on every endpoint request

    After decrypting a request, look up flow_token before using data. INIT, BACK and data_exchange all carry it (the ping health check does not). If the token is unknown, expired or already used, respond with HTTP 427 and an optional error_msg for the user.

  4. Echo it when the Flow completes

    An endpoint finishes the Flow by returning the SUCCESS screen with data.extension_message_response.params.flow_token set to the same token; any other params you add are forwarded to your messages webhook.

  5. Reconcile from the webhook, once

    The completion arrives as an interactive message of type nfm_reply. Parse nfm_reply.response_json (a JSON string), check the token belongs to the sender in from, and flip its status from pending to completed in one atomic update before acting.

07 · Cautions

Common mistakes with the Flow token (flow_token)

  • Leaving the default or reusing one token

    A missing token on a template button becomes unused, and a hard-coded token makes every submission look the same. Mint a new value per send so each completion maps to exactly one record.

  • Treating the token as proof of identity

    Anyone holding the value can present it. Authenticate endpoint traffic with the signature and encryption, and in the webhook check that the token was minted for the WhatsApp ID in from.

  • Packing data into the token

    A base64 phone number, order total or customer name inside the token is personal data copied into logs and payloads. Keep the token opaque and store the context server-side.

  • Processing the completion twice

    Webhook deliveries are retried, so the same nfm_reply can arrive again. Change the token's status with a single conditional update and skip anything that is no longer pending.

  • Expiring sessions without a way back

    Users return to old messages. Pick an expiry that matches the business validity (a slot hold, an offer) and answer stale tokens with 427 plus a fresh Flow, not a silent failure.

08 · Rationale

Why does the Flow token (flow_token) matter?

Flows collect data off the main chat timeline. A customer can open the same booking Flow from yesterday's message and today's, abandon it halfway, or submit it while three other messages are in flight — and a webhook retry can deliver the same completion twice. Matching by phone number and timestamp breaks in all of those cases. A per-send token turns every endpoint call and every submission into a direct lookup: this is the home-collection booking for draft HSC-48213, still pending, owned by this WhatsApp user — or it is stale, and you say so instead of double-booking a slot.

09 · Worked example: Home sample collection in Kochi

Example: Home sample collection in Kochi

A Kochi diagnostics lab sends a booking Flow after a doctor's prescription is uploaded. The token ftk_bk_… maps to a draft with the test panel and the patient's pincode, valid for 48 hours. The endpoint uses the token on INIT to show only slots near that pincode, and on data_exchange to hold the chosen slot. Two days later the patient taps the same message again: the draft has expired, so the endpoint returns 427 with "This booking link has expired — we've sent you a new one", and the bot sends a fresh Flow with a new token. When a network blip makes Meta deliver the original completion webhook twice, the second copy finds the token already completed and is ignored.

10 · Recommended practice

Best practices for the Flow token (flow_token)

  • Use a short purpose prefix (ftk_bk_, ftk_kyc_) before the random part — it makes logs readable without leaking meaning.
  • Log the token on every endpoint call and webhook so one Flow session can be traced end to end.
  • Send a new Flow with a new token instead of trying to revive an expired one.
  • Return the same booking or case reference in the completion params so the webhook needs no extra lookup.

11 · Questions and answers

Interactive Flow Token FAQs

Is flow_token required when sending a WhatsApp Flow?
Set it every time, even where it is technically optional. On a template's Flow button an omitted token defaults to unused, which leaves you unable to tell one submission from another; endpoint requests and the completion response always carry it.
Can I use the flow_token to authenticate the user?
No. It is a correlation key that passes through the user's device, not a secret. Rely on the X-Hub-Signature-256 signature and the payload encryption to trust endpoint requests, and check the token's owner against the sender in the webhook.
What should my Flow endpoint return for an expired flow_token?
Return HTTP 427, optionally with an error_msg such as "The order has already been placed". WhatsApp shows the user an error and disables that Flow's button; send a new Flow message with a new token if they still need to finish.
Where is the flow_token when the user submits a Flow?
Inside the response_json string of the nfm_reply interactive message on your messages webhook. Parse that string as JSON to read flow_token alongside the submitted fields or the params your endpoint returned.
How is the flow_token different from a wamid?
You choose the flow_token to identify a Flow session; Meta assigns a wamid to identify one message. The completion webhook has both: the wamid of the nfm_reply message and, inside response_json, your token.

Put Interactive Flow Token to work

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.