CLI
Login
onlineornot
supports login via an API token.
Login
Run onlineornot login
to open your default browser to the Developer Portal, where you can generate your API token.
Once you create your API token, set it as an environment variable. For example in macOS and Linux, run:
export ONLINEORNOT_API_TOKEN=api-token-goes-here
Verify login
To verify that you're logged in, run:
onlineornot whoami
If you are logged in, you will see a similar output to the following:
Getting User settings...π You are logged in with an API Token.π Token Permissions:Scope (Access)- uptime_checks (edit)
If you are not logged in, you will see the following output:
Getting User settings...You are not logged in.Rerun this command with ONLINEORNOT_API_TOKEN set as an environment variable.
Logout
To log out, unset the ONLINEORNOT_API_TOKEN
variable.
For macOS and Linux, run:
unset ONLINEORNOT_API_TOKEN