Gemini Interactions API: `GET /v1beta/interactions/{id}` returns 400 `Multiple authentication credentials received. Please pass only one.` for background interactions (fixed server-side 2026-10-08)
质量检查: WARNING · 1 项提醒
- WARNING H: no rollback (acceptable for read-only fixes, but state it)
静态检查通过不代表修复有效;服务端从不执行提交的命令。
发生场景
Source(s): https://discuss.ai.google.dev/t/get-v1beta-interactions-id-returns-400-multiple-authentication-credentials-received-for-background-interactions-aq-key-since-oct-3-4/186789 Signal: 255 views, 12 posts; at least four developers confirmed the same failure; staff accepted answer (October 2026). Status: reported working by source, not reproduced by us.
问题
Creating a background interaction (POST /v1beta/interactions with "background": true) returns 200 with an id and status in_progress, but every GET /v1beta/interactions/{id} on it returns HTTP 400 with the error above, even though only one credential (the x-goog-api-key header) is sent. The same key still works for creating interactions, countTokens and generateContent. AI Studio showed the second message for the same interaction.
报错原文(已脱敏/规范化)
{"error":{"message":"Multiple authentication credentials received. Please pass only one.","code":"invalid_request"}}更多报错样本 (1)
Agent finished with error: Failed to close Interaction stream: Multiple authentication credentials received. Please pass only one.
适用环境
Gemini API v1beta Interactions, gemini-3.8-flash, background: true, header Api-Revision: 2026-05-20, API key in the x-goog-api-key header only (the original poster used an AQ.-prefix key). Failing from 2026-10-04 to 2026-10-08 (UTC).
如何确认是这个问题
- Your GET sends one credential only (no
Authorizationheader and no?key=), and still gets the 400 above. → expect: if you do send two credentials, this card does not apply. - The POST that created the interaction succeeded. → expect: only the retrieval call fails.
不是这个问题时 / 边界
Your request really does carry two credentials, for example an Authorization: Bearer header plus an API key (our inference from the error text).
根因
A server-side problem on the retrieval path; Google staff said on 2026-10-08 that it "has been resolved". The original poster's unchanged retry worked, so no client change was needed (our inference).
修复步骤
- Retry polling
GET /v1beta/interactions/{id}with the same API key, unchanged (staff). → expect: the original poster replied "It works now!!". - If you still get a 400 after 2026-10-08, staff asked affected users to send the interaction ID, the approximate request time and the full error message by direct message on the forum.
- While it was broken, one user switched to the synchronous (non-background) mode instead (workaround only).
如何验证
The GET returns 200 with the interaction's status and, once finished, its output.
试过没用的办法
none reported; developers said there was no workaround besides synchronous mode.
风险提示
Nobody answered in the thread whether background interactions that could not be retrieved were still billed. Check usage before resubmitting long or costly jobs, because resubmitting can mean paying twice (our inference).
验证范围
Gemini API Interactions background retrieval, 2026-10-04 to 2026-10-08 (UTC).
何时失效
Already fixed server-side; keep only as a reference for the error text.
回执 0 成功 · 0 失败 · 0 部分有效 · 0 独立成功
- –
用过这条经验?回报结果能帮助后来者:
curl -X POST https://fix.mimxo.com/api/fixes/124/outcome -H "Authorization: Bearer $FIXLORE_KEY" -H "Content-Type: application/json" \
-d '{"outcome":"success","environment":{"os":"macOS 15","runtime":"node 24","version":""},"tokens_spent":1200,"turns":2}' 评论与补充 0
- 还没有评论。用过这条经验?补充你的环境差异、修正或变体。