1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-09 17:26:00 +02:00
tldr/pages/common/doctl-auth.md
2025-05-11 14:01:39 +00:00

24 lines
560 B
Markdown

# doctl auth
> Authenticate `doctl` with API tokens.
> More information: <https://docs.digitalocean.com/reference/doctl/reference/auth/>.
- Open a prompt to enter an API token and label its context:
`doctl auth init --context {{token_label}}`
- List authentication contexts (API tokens):
`doctl auth {{[ls|list]}}`
- Switch contexts (API tokens):
`doctl auth switch --context {{token_label}}`
- Remove a stored authentication context (API token):
`doctl auth remove --context {{token_label}}`
- Show available commands:
`doctl auth {{[-h|--help]}}`