Galon Cloud
Galon API v1

/projects/{project_id}/keys/browser

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

GET /projects/{project_id}/keys/browser

List the browser keys of a project

Browser keys (never their fingerprint), the scopes they can carry and the limits. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.

Console session only (signed-in console).

Parameters

NameInTypeDescription
project_idpathstring · required

Responses

StatusDescriptionBody
200browser_keys, scopes, limitsBrowserKeyList
401unauthorized (session missing, expired or revoked)Error
403reserve_adminError
404not_found, project_not_found, browser_key_not_foundError
422browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)Error

Examples

curl

curl -X GET "$GALON_API_BASE/projects/<project_id>/keys/browser" \
  -H "Authorization: Bearer $GALON_API_KEY"

POST /projects/{project_id}/keys/browser

Create a browser key

One screen: the sites (origins) allowed to use the key, the Geo scopes, an optional daily cap in billed units (default 10,000: one per request, one per matrix pair, one per address to geocode) and a name. The key is public by nature: it only works from the declared origins, within the daily cap; a request that would exceed it is refused whole. Console session; a live key is created, changed, revoked or copied only by the admin and member roles (403 reserve_admin). 404 not_found when Geo is not served to this account.

Console session only (signed-in console).

Parameters

NameInTypeDescription
project_idpathstring · required

Request body

application/json · schema BrowserKeyCreate

FieldTypeDescription
originsarray<string> · requiredSites allowed to use the key: example.com, *.example.com (subdomains), https://example.com:8443, localhost:3000. https only, except localhost.
scopesarray<"geo:geocode" | "geo:route" | "geo:maps"> · requiredgeo:geocode, geo:route, geo:maps.
daily_capintegerBilled units per UTC day (default 10,000).
namestringName.
environment"test" | "live"The project environment (default test).

Responses

StatusDescriptionBody
201The key (api_key) and its settingsBrowserKey
409browser_key_limit_reached (10 active keys per project)Error
401unauthorized (session missing, expired or revoked)Error
403reserve_adminError
404not_found, project_not_found, browser_key_not_foundError
422browser_key_invalid, browser_key_origin_invalid, browser_key_origin_insecure, browser_key_origins_required, browser_key_origins_too_many, browser_key_scopes_invalid, browser_key_daily_cap_invalid, browser_key_name_invalid, browser_key_environment (field names the field)Error

Examples

curl

curl -X POST "$GALON_API_BASE/projects/<project_id>/keys/browser" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scopes": ["geo:geocode"], "origins": ["string"]}'