secret_key_in_browser (403)
An sk_ key was sent from a browser: the request carried an Origin header, or any
Sec-Fetch-Site header, which every browser adds to every request it makes (same-origin
fetches, workers, frames and extensions included). The key is now flagged possiblyExposed in
GET /v1/account, and the portal's keys page shows the warning. The account's Owners get one
email about it, for a test key as for a live one. The key itself keeps working, so that your
server is not cut off: only requests that look like a browser's are refused.
Fix: call the API from your server with the sk_ key, or use the pk_ key plus a client token
in the browser. If this call really comes from your server, stop forwarding the browser's Origin
and Sec-Fetch-* headers to the API (a proxy that copies the browser's headers looks like the
browser). Then replace the flagged key: make a new one in the portal, put it on your server, and
revoke this one.
This check runs right after the key is found, before anything else about the request is looked at, so a missing header or a malformed body never hides it.