CLI Tool
CLI Authentication
Before you can use the Webhook Simulator CLI tool, you need to authenticate it with your account. This guide will walk you through the authentication process.
Logging In
To log in to your Webhook Simulator account through the CLI, follow these steps:
Open your terminal.
Run the following command:
ws-cli login
You will be prompted to enter your email address and password.
If the login is successful, you'll see a welcome message and your account information.
Authentication Process
Behind the scenes, the login process does the following:
- Sends your credentials to the Webhook Simulator API.
- Receives an authentication token.
- Stores the token securely in your local configuration file.
Configuration Storage
The CLI tool stores your authentication information in a configuration file located at $HOME/.ws-cli/config.yaml
. This file contains:
- Your authentication token
- Your client ID
- Your app ID
- Your user ID
Important Note
You will also see an environment variable in this file. This variable is used internally by the CLI tool and should not be modified.
Logging Out
To log out and remove your authentication information, use:
ws-cli logout
This command will clear your stored credentials from the local configuration file.
Checking Authentication Status
You can check your current authentication status by running any command that requires authentication. If your token has expired or is invalid, you'll be prompted to log in again.
Security Considerations
- Never share your authentication token or the contents of your configuration file.
- If you suspect your token has been compromised, log out and log in again to generate a new token.
- The CLI tool uses HTTPS for all communications with the Webhook Simulator API to ensure the security of your credentials.
Troubleshooting
If you encounter authentication issues:
- Ensure you're using the correct email and password.
- Try logging out and logging in again.
- Check your internet connection.
- If problems persist, contact our support team.
Remember, keeping your CLI tool authenticated allows for seamless interaction with the Webhook Simulator service, enabling you to listen for events and trigger webhooks effortlessly.