Webhook Simulator Icon

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:

  1. Open your terminal.

  2. Run the following command:

ws-cli login
  1. You will be prompted to enter your email address and password.

  2. 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:

  1. Sends your credentials to the Webhook Simulator API.
  2. Receives an authentication token.
  3. 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:

  1. Ensure you're using the correct email and password.
  2. Try logging out and logging in again.
  3. Check your internet connection.
  4. 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.

Previous
Installation