Docs / Errors
SECRET_KEY_IN_BROWSER
403Secret key in a browserWhy it happens
A browser called the API with a secret key. A secret key belongs on your server: in a web page, anyone who opens the page can read it and use it as you.
What to do
- Revoke the key in the console now: treat it as leaked.
- Call the API from your server with a new secret key, or create a publishable key and add your site to its Allowed origins.
Example response
HTTP/1.1 403
{
"type": "https://hub.masjidbox.com/docs/errors/SECRET_KEY_IN_BROWSER",
"title": "Secret key in a browser",
"status": 403,
"detail": "A browser call with a secret key. Revoke the key, and call from your server or with a publishable key.",
"instance": "/v1/masjids/msj_abc123defg",
"code": "SECRET_KEY_IN_BROWSER",
"requestId": "req_8f14e45fceea167a5a36dedd4bea2543",
"requestLogUrl": "https://hub.masjidbox.com/console/logs/req_8f14e45fceea167a5a36dedd4bea2543"
}