The CLI and every CI integration authenticate with a personal access token. Tokens belong to your user and act with your team role; create separate tokens for your laptop and for each CI system so one can be deleted without affecting the others.
Quick start
Section titled “Quick start”export MARATHON_CLOUD_API_KEY=YOUR_TOKENmarathon-cloud devices androidEvery command reads the token from MARATHON_CLOUD_API_KEY, or from --api-key if you prefer to pass it explicitly.
Create a token
Section titled “Create a token”- Sign in to the Marathon Cloud console and open the user menu in the top-right corner.
- Choose Tokens. The page is at
/tokens. - Under Create token, enter a Name that identifies where the token will be used, for example
github-actionsorlaptop, and click Create. - A Token created dialog shows the value once. Use the copy button and store it in your secret manager before closing the dialog.
Delete a token
Section titled “Delete a token”Active tokens are listed under Active tokens with their name and creation date.
Click the trash icon next to a token and confirm with Delete. Requests using that token are rejected with 401 Unauthorized from that moment.
Where to store it
Section titled “Where to store it”| Environment | Store as |
|---|---|
| GitHub Actions | Repository or organization secret, passed as apiKey |
| CircleCI | Context or project environment variable MARATHON_CLOUD_API_KEY |
| Bitrise | Secret MARATHON_CLOUD_API_KEY, passed as api_key |
| Local shell | MARATHON_CLOUD_API_KEY in your shell profile, or a secrets manager |
Never commit a token to version control. See CI/CD integration for per-platform examples.