Get Your Service Token

  1. Log in to your SuprSend dashboard
  2. Go to Account Settings → Service Tokens
  3. Create a new service token or copy an existing one

Authentication Methods

The CLI resolves authentication using this priority order:
PriorityMethodWhen to UseDuration
1Environment VariableRunning the CLI inside CI/CD pipelines, Docker containers and serversSession-based
2Command-Line FlagBest for one-off commands, local testing, debuggingOne-time
3Active ProfileFor local development or self hosting where you have more than 1 serverPersistent

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.
export SUPRSEND_SERVICE_TOKEN="your_service_token_here"

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.
suprsend workflow list --service-token "your_service_token_here"

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.
suprsend profiles add --name eu-server --token "your_token_here"
suprsend profiles use eu-server

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.

Rotation Strategy

1. Scheduled Rotation: Implement a scheduled rotation of service tokens (e.g. every 6 months) to reduce the risk of long-term exposure. 2. Ad-Hoc Rotation: Rotate tokens immediately if you suspect that a token has been compromised or if it has been inadvertently exposed.