Get Your Service Token
- Log in to your SuprSend dashboard
- Go to Account Settings → Service Tokens
- Create a new service token or copy an existing one
Authentication Methods
The CLI resolves authentication using this priority order:| Priority | Method | When to Use | Duration |
|---|---|---|---|
| 1 | Environment Variable | Running the CLI inside CI/CD pipelines, Docker containers and servers | Session-based |
| 2 | Command-Line Flag | Best for one-off commands, local testing, debugging | One-time |
Environment Variable
Best for development environments, CI/CD jobs, or scripts.Define your token once per session, and all CLI commands in that script will use it automatically.
Command-Line Flag
Best for running ad-hoc commands locally or for testing or debugging with different credentials.Pass the token inline without modifying your environment. We don’t recommend this method since flags can appear in shell history or process listings.
Self-hosted or BYOC deployment? These two methods work for SuprSend Cloud (SaaS), where the CLI connects to default SuprSend endpoints. If you are running a self-hosted or BYOC deployment with custom API endpoints, you’ll need to set up CLI profiles to tell the CLI where your servers are. See Setting Up CLI Access.Profiles are not related to workspaces. The
-w flag (e.g., -w production) selects a workspace environment. Profiles configure which server the CLI connects to.Security best practices
- Do not commit tokens in scripts, repositories, or configuration files.
- Prefer environment variables over command-line flags, since flags can appear in shell history or process listings.
- Rotate service tokens regularly and follow principle of least privilege and restrict permissions to the minimum required.