Authentication
You need to authenticate to Probely to get a valid authorization token, which is required to run Probely CLI commands.
Step 1: Obtain the authorization token
Follow these steps to obtain the authorization token:
- Go to the Probely app and authenticate.
- Generate an API Key, which is your authorization token. Learn how in this Help Center article on How to generate an API Key.
- Save the generated API Key in a safe place.
Treat the authorization token as a password since it allows access to information in your account and possible manipulation (depending on the role associated with the API Key).
Step 2: Use the authorization token
You have different ways of using the authorization token (API Key) to run your CLI commands.
- Configuration File
- Environment Variable
- Command Option
Make the authorization token available to all your CLI commands through a configuration file as follows:
- Create the file
~/.probely/config
. - Set the file content with:
Put your authentication token (API Key) where you seeFile ~/.probely/config
[AUTH]
api_key = <YOUR_API_KEY><YOUR_API_KEY>
. - Save the file.
- Run a CLI command, for example, to list the targets in your account:
CLI command
probely targets get
Make the authorization token available to all your CLI commands through the PROBELY_API_KEY
environment variable.
- Set the environemnt variable value, for example:
Put your authentication token (API Key) where you seeBash command
export PROBELY_API_KEY=<YOUR_API_KEY>
<YOUR_API_KEY>
. - Run a CLI command, for example, to list the targets in your account:
CLI command
probely targets get
Include the authorization token in your CLI commands using the --api-key
option.
For example, list the targets in your account:
probely targets get --api-key <YOUR_API_KEY>
Put your authentication token (API Key) where you see <YOUR_API_KEY>
.