X-Gallery-Token on every request.
Generating a token
1
Open the project in the panel
Navigate to your project and go to Settings → Gallery.
2
Generate a token
Click Generate token.
3
Copy it immediately
The token is shown only once. The panel stores only the SHA-256 hash — there is no way to retrieve the original value later.
Using the token
Pass it tocreateFramalabClient at initialization:
Store both values as environment variables.
.env.local
client.ts
X-Gallery-Token: <token> to every request automatically.
Storing the token
Treat gallery tokens like API keys — do not commit them to source control.
As long as data fetching happens server-side (Server Components, SSG, SSR), the token never reaches the browser.
Token lifecycle
Error when the token is invalid
401. See Error Handling for how to catch this in code.