curl 'https://fetch-<project-token>.frontic.com/context/token' \
-H 'fs-context: <context-key>'
{
"token": "ae0d4981-c363-4d5a-a49e-1f053d49f2f7",
"region": "eu",
"locale": "de-DE"
}
{
"error": "Token not found",
"code": "TOKEN_NOT_FOUND",
"details": [],
"correlationId": "9f1c2e7a-4b30-4d8e-9a55-2c6f0b7d1e84"
}
Fetch API
Get Context
GET
/
context
/
token
curl 'https://fetch-<project-token>.frontic.com/context/token' \
-H 'fs-context: <context-key>'
{
"token": "ae0d4981-c363-4d5a-a49e-1f053d49f2f7",
"region": "eu",
"locale": "de-DE"
}
{
"error": "Token not found",
"code": "TOKEN_NOT_FOUND",
"details": [],
"correlationId": "9f1c2e7a-4b30-4d8e-9a55-2c6f0b7d1e84"
}
Resolve a
contextKey to the stored region, locale, and scope. Useful for hydrating client state from a cookie, or for verifying a token before making other requests.
Path Parameters
string
required
Your project’s Fetch token, embedded in the subdomain.
Headers
string
required
The
contextKey to resolve. The token must be 36–50 characters and exist in the project.string
Required when the project has fetch API keys configured.
Response
string
required
The active
contextKey.string
required
The region key (e.g.
eu, uk).string
required
The locale key (e.g.
de-DE, en-GB).Status codes
| Code | When |
|---|---|
200 | Token resolved |
400 | INVALID_TOKEN - fs-context not in the 36–50 character range |
401 | fs-secret missing or wrong (only when the project has fetch keys configured) |
404 | TOKEN_NOT_FOUND - token doesn’t exist in this project |
curl 'https://fetch-<project-token>.frontic.com/context/token' \
-H 'fs-context: <context-key>'
{
"token": "ae0d4981-c363-4d5a-a49e-1f053d49f2f7",
"region": "eu",
"locale": "de-DE"
}
{
"error": "Token not found",
"code": "TOKEN_NOT_FOUND",
"details": [],
"correlationId": "9f1c2e7a-4b30-4d8e-9a55-2c6f0b7d1e84"
}