sentrix auth
Sign in and verify API authentication and connectivity.
sentrix auth
Sign in to Sentrix, test authentication, and verify connectivity to the Sentrix API.
Subcommands#
sentrix auth login#
Start browser OAuth login and store the resulting session in your local Sentrix secret store.
Usage#
sentrix auth login [--port <port>] [--timeout <seconds>]
Options#
| Flag | Type | Default | Description |
|---|---|---|---|
--port | integer | from config, default 17483 | Local callback port used by the browser OAuth redirect. |
--timeout | integer | from config | Seconds to wait for the browser callback before failing. |
WSL browser setup#
On Windows WSL (Ubuntu), browser login opens a Windows browser and waits for the callback in WSL. Install wslu and xdg-utils so the CLI can delegate browser opening to Windows:
sudo apt update
sudo apt install -y wslu xdg-utils
command -v wslview
wslview https://api.sentrix.ai
command -v wslview should print a path, and wslview https://api.sentrix.ai should open your Windows browser.
Examples#
Start browser login:
sentrix auth login
Use a longer callback timeout:
sentrix auth login --timeout 300
The CLI prints a local callback URL such as http://127.0.0.1:17483/callback; do not open that callback URL directly. Complete the login in the browser window opened by the CLI.
sentrix auth test#
Verify that your stored credentials are valid and the CLI can reach the Sentrix API.
Usage#
sentrix auth test [--method <auto|api-key|oauth>] [--url <url>] [--key <key>] [--verbose]
Options#
| Flag | Type | Default | Description |
|---|---|---|---|
--method | string | auto | Authentication method. Values: auto, api-key, or oauth. auto prefers a stored OAuth session when present and falls back to API-key authentication. |
--url | string | from config | Override the API base URL for this test only. |
--key | string | from config | Override the API key for this test only. Applies to API-key authentication. |
--verbose | bool | false | Print the request URL and response time to stderr. |
Examples#
Test with your configured credentials:
sentrix auth test
Test with verbose output:
sentrix auth test --verbose
Test your stored browser OAuth session:
sentrix auth test --method oauth
Test a specific API key before saving it to your config:
sentrix auth test --key sk-your-new-key
Test against a different API endpoint:
sentrix auth test --url https://api.staging.sentrix.ai --key sk-staging-key