Solution skill
Flagsmith key type must match the evaluation mode
Complete solution
Shows how to fix flagsmith key type must match the evaluation mode. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Keep server-side tokens out of client bundles.
Steps
- Pair the key to the mode: server-side token for local evaluation, environment key for remote. Keep server-side tokens out of client bundles. After changing a flag in the dashboard, wait out the 60-second refresh or trigger a manual refresh before concluding the SDK is broken.
When to use
You are seeing this: Pair the key to the mode: server-side token for local evaluation, environment key for remote. Use this skill when you run into "Flagsmith key type must match the evaluation mode".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Official docs (Flagsmith server-side SDKs): the API token you configure is either the Environment API key or the Server Side SDK Token, depending on whether you run local or remote evaluation. Mixing them up is a common auth failure: a client-side environment key cannot drive local evaluation, and a server-side token in browser code leaks a credential that can read every flag in the environment. The SDK overview adds that local mode makes no further network calls for 60 seconds after init, so flag edits are invisible until the next refresh.
Verified resolution: Pair the key to the mode: server-side token for local evaluation, environment key for remote. Keep server-side tokens out of client bundles. After changing a flag in the dashboard, wait out the 60-second refresh or trigger a manual refresh before concluding the SDK is broken.
Source URL: https://docs.flagsmith.com/integrating-with-flagsmith/sdks/
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_AHu38ooAlSQcl1QWWhix5g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flagsmith key type must match the evaluation mode <span>— Vectle</span></a>