How to troubleshoot authentication
This guide walks through the most common authentication problems and how to resolve them.Start with the doctor command
The quickest first step is:Check your current auth status
You are not authenticated at all
Run the login flow:~/.landbase/platform.json.
If you cannot open a browser (CI environment, remote server), use an API key instead:
Your session has expired
Platform OAuth sessions expire. If commands are returning auth errors after previously working, your session has expired. Re-run:You have an API key but commands are failing with auth errors
Check that the key is correctly set:Wrong mode: platform vs. legacy
There are two auth modes. Most users are on platform mode (the default). If you are getting auth errors that referencelbk_ keys when you have an lbs_ session (or vice versa), you may have the wrong mode active.
Check which mode is active:
Clear stored credentials and start fresh
If you are unsure what state your credentials are in, clear everything and re-authenticate:logout removes the stored session from ~/.landbase/platform.json and ~/.landbase/config.json. After this, auth status should say “not authenticated” and auth login will walk you through a fresh login.
Still failing after all of the above
Run with verbose output to see what is being sent and received:Related
- auth command reference — full auth command options
- Platform mode vs. legacy mode — background on the two auth models
- environment variables reference — LANDBASE_API_KEY and related vars

