Answer an approval
October 16, 2026 (November 16, 2026)
Table of contents
In the ask approval mode, the agent stops before it spends credits and asks for permission, showing what it wants to make and what it costs. The chat’s status is then waiting_approval, the stream sends an approval event, and GET /agent/chats/chatId shows pendingApproval:
{ "turn": 1, "cost": 10, "images": 0, "videos": 1 }
cost is in Flow credits. Answer with this request. The turn that asked goes on: the agent generates (or not) and replies in the same turn, and you follow it on the stream as before.
Answer within about 4 minutes of the request. Since Google changed Flow Agent on November 10, 2026, it accepts an answer only while the turn that asked is still open, and it closes an unanswered request about 5 minutes after asking (the agent then says the request timed out). After that Google closes the request: the agent replies that it timed out, the turn ends, an answer gets 409, and you send the message again to get a new request. If you don’t want to answer requests at all, set the project to the auto approval mode with PUT /agent/settings approval: "auto", and the agent spends without asking.
approvelets the agent go ahead this time.alwayslets it go ahead, and switches the project to theautoapproval mode, so the agent no longer asks in any chat of the project. Switch back with PUT /agent/settingsapproval: "ask".rejectdeclines. The agent replies without generating.
While a request waits, a new message with POST /agent/chats/chatId/messages gets 409: answer the request first, with reject to decline it. A waiting turn counts toward the 3 agent turns an account can run at once.
The request answers 202 as soon as Google has accepted the turn. That usually takes a few seconds to about 40 seconds and can take up to about 100 seconds, so set your HTTP client’s timeout to about 150 seconds. The turn then keeps running on Google’s side whether or not you are connected. Follow it live with GET /agent/chats/chatId/stream, read it with GET /agent/chats/chatId, or get it posted to your replyUrl when it ends.
A 504 means Google has not confirmed the turn yet, and it may still start. Read the chat with GET /agent/chats/chatId before you send it again.
Each turn uses one captcha, solved by the API with your captcha providers or the free captcha credits of your first account.
https://api.useapi.net/v1/google-flow/agent/chats/
chatId/approval
chatIdis required, URL-encoded in the path, from POST /agent/chats or GET /agent/chats.
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"decision": "approve"
}
decisionis required.
Supported values:approve,always,reject.replyUrl,replyRef,captchaToken,captchaRetryandcaptchaOrderare accepted and not used. The turn goes on, so its callback goes to thereplyUrlof the message that started it, and the answer needs no captcha.
Responses
-
Google took the answer, and the agent goes on with the turn that asked.
{ "chatId": "c-u12345-email:john@gmail.com-project:f166200a-ea22-461a-bc68-47ff6d3ee500-chat:2a0f1973-d554-4fbc-aa6b-0c372edf182e-bot:google-flow", "email": "john@gmail.com", "turn": 1, "status": "running" } -
decisionis missing or not one of the supported values, or the path value is not achatId.{ "error": "Parameter decision is required", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
The
chatIdbelongs to another useapi.net user.{ "error": "This chat belongs to another user", "code": 403 } -
The chat was deleted, or its account is not added.
{ "error": "Chat not found: it was deleted or never existed", "code": 404 } -
Nothing in this chat is waiting for approval, a turn is still running, or the request is more than about 4 minutes old and Google no longer takes an answer. Send the message again for a new request, or switch the project to
approval: "auto".{ "error": "Nothing in this chat is waiting for approval", "code": 409 }{ "error": "This approval can no longer be given: since Google changed the Flow agent on 2026-11-10 it accepts an answer only while the turn that asked for it is still open, and closes the request about 4 minutes after asking. Send the message again for a new ask, or set approval to auto (PUT /agent/settings with \"approval\": \"auto\") so turns never wait", "code": 409 } -
429has two causes. When the API picked the account itself (noemail), retry or pass another account’semail.The account already runs 3 agent turns, the most the API runs at once per account. Wait for one to finish, or use another account. The answer carries a
Retry-Afterheader (seconds) and aretryAftertime in the body.{ "error": "Account john@gmail.com already runs 3 agent turns (our limit per account). Wait for one to finish or use another account", "code": 429, "retryAfter": "2026-10-16T22:26:47.819Z" }The account reached Google’s daily limit on agent messages. Google does not publish the limit. The message Google refused answers with
reasonAGENT_QUOTA, and after that the API answers at once until midnight UTC, withRetry-AfterandretryAfterset to that time. Use another account until then.{ "error": "Google's daily Flow agent limit is reached for john@gmail.com. Try again after 2026-10-17T00:00:00.000Z or use another account", "code": 429, "retryAfter": "2026-10-17T00:00:00.000Z" } -
Google did not take the answer. Read the chat with GET /agent/chats/
chatId: if it still waits for approval, answer again, otherwise send the message again. -
Google Flow could not be reached to read the chat. Nothing was sent. Retry shortly.
{ "error": "Google Flow is not reachable right now and could not read the chat. Retry", "code": 503 } -
596 Session Error
The account’s Google session is no longer valid. Delete the account with DELETE /accounts/
emailand add it again by following Setup Google Flow.
Model
The chat, its account and the turn that asked, which goes on as running.
The approval answer, field by field
{ // TypeScript, all fields are optional
chatId: string // the chat's id
email: string // the account the chat runs on
turn: number // the turn that asked, which goes on
status: 'running' // the turn goes on, after a reject too
error?: string // errors only
code?: number // errors only
retryAfter?: string // 429 only
}
Examples
-
CHATID="c-u12345-email:john@gmail.com-project:f166200a-...-chat:2a0f1973-...-bot:google-flow" curl -X POST "https://api.useapi.net/v1/google-flow/agent/chats/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$CHATID")/approval" \ --max-time 150 \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -d '{ "decision": "approve" }' -
const token = 'YOUR_API_TOKEN' const chatId = 'chatId from POST /agent/chats' const response = await fetch(`https://api.useapi.net/v1/google-flow/agent/chats/${encodeURIComponent(chatId)}/approval`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, body: JSON.stringify({ decision: 'approve' }), signal: AbortSignal.timeout(150_000) }) console.log(response.status, await response.json()) -
import requests from urllib.parse import quote token = 'YOUR_API_TOKEN' chatId = 'chatId from POST /agent/chats' r = requests.post( f'https://api.useapi.net/v1/google-flow/agent/chats/{quote(chatId, safe="")}/approval', headers={'Authorization': f'Bearer {token}'}, json={'decision': 'approve'}, timeout=150, ) print(r.status_code, r.json())
Try It
The stream’s Try It also shows Approve, Always and Reject buttons on each approval event.