If you see “Logged in to exploratory.io as …”, you are signed in.
Sign in with an API key
An API key lets expl sign in without a browser. Create one in Account Settings > API Keys (see API keys), then run this.expl asks "API key:" and does not show what you paste. When the key comes through a pipe, expl reads it from standard input.
Result
--with-token cannot be used together with --no-browser. To choose the server, add --url.
The key is saved in the same place as a browser login (see Where the login is saved). A saved API key is never refreshed and never opens a browser. Signing in again replaces it.
Instead of saving it, you can set the environment variable EXPL_SERVER_TOKEN. It is used before any saved login.
To switch from the environment-variable key to a saved login, run unset EXPL_SERVER_TOKEN first. While it is set, it is used before the saved login.
Without a browser
Use this on a machine where expl cannot open a browser, such as a remote server.1. Open the URL
The command prints a URL that starts with https://exploratory.io/oauth/authorize? and waits. Open that URL in a browser.2. Allow access
Sign in to Exploratory and allow access.3. Expect an error page
The browser then goes to a page that cannot be reached. That is expected.4. Copy the redirect URL
Copy the URL in the browser’s address bar. It starts with http://127.0.0.1/callback?code=. It is not the first URL the command printed.5. Paste it
Paste it into the terminal and press Enter.“Logged in to … as …” means you are signed in.The code in that URL works only once and expires 60 seconds after the browser reaches that page, so paste it right away. If signing in fails, start again from the beginning.
Where the login is saved
The login is saved under ~/.exploratory/expl/server/, one file per host, with permission 0600 (readable only by you). A browser login and an API key saved by--with-token go to the same place. On Windows it is under %USERPROFILE%\.exploratory\expl\server\.
A saved login is used only for the same origin (scheme, host and port). On a standard port, a later login to the same host replaces the saved file.
If the browser login is revoked on the server (for example in Connected AI Apps), the next call exits with code 4 and tells you to run expl server login. An API key is revoked in Account Settings > API Keys.
The server URL
The default server is https://exploratory.io. To use another server, pass--url or set the environment variable EXPL_SERVER_URL. The order of precedence is as follows.
What the server records
For the operations that expl server calls, Exploratory Server records the following. It records the same when an AI tool connects to Exploratory through MCP.- Tokens and API keys: stored as hashes, not as plain text, with the creation time, expiry and last use. You can see and revoke the tokens of a browser login in Connected AI Apps, and API keys in Account Settings > API Keys.
- Data access log: the item, your user ID and email address, the channel (cli), how you signed in (browser or API key) and the API key name, the operation, the client name, the IP address, the result and error code, and the duration. Kept for 90 days by default (1 to 400 days, set on the server).
- Server log: each tool call (email address, client, result, row count, duration), and when a token is created or deleted.
- Errors of failed calls: the time, the tool call and the error are collected to improve the product.
