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 |
3 | Active Profile | For local development or self hosting where you have more than 1 server | Persistent |
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.
Active Profile
Best for local development or self-hosted setups where you have more than one server.Profiles let you save your configuration once, so you don’t need to re-export tokens in every session. You can create multiple profiles and simply switch the active profile when needed.
Security best practices
- Do not commit tokens in scripts, repositories, or configuration files.
- Prefer environment variables or profiles 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.