CLI
Log in to the CLI
The OnlineOrNot CLI uses an API token for authentication.
Get your API token
Run:
onlineornot login
This opens the Developer Portal where you can generate an API token.
Set the token
Export the token as an environment variable:
export ONLINEORNOT_API_TOKEN=your-api-token-here
Verify login
onlineornot whoami
If authenticated, you'll see:
Getting User settings...
π You are logged in with an API Token.
π Token Permissions:
Scope (Access)
- uptime_checks (edit)
If not authenticated:
Getting User settings...
You are not logged in.
Rerun this command with ONLINEORNOT_API_TOKEN set as an environment variable.
Log out
Unset the environment variable:
unset ONLINEORNOT_API_TOKEN