GET /v2/account), so a rejected or mistyped token is refused immediately.
What Ankra Accesses
One token covers both cluster types. For self-managed droplet clusters, Ankra provisions the infrastructure directly:
For DOKS, Ankra uses the managed Kubernetes API instead:
For cost reconciliation, Ankra also reads the account’s billing:
Creating a DigitalOcean API Credential
1
Get a DigitalOcean token
- Log in to the DigitalOcean Control Panel
- Go to API → Tokens → Generate New Token
- Give it Read & Write access - with Full Access scopes, or custom scopes covering at least
droplet,ssh_key,vpc,firewall,tag,load_balancer, andkubernetes(addregionsandsizesread for the wizard’s options, andbilling:readso Ankra can import your invoices for cost reconciliation) - Copy the token (prefixed with
dop_v1_; shown once)
2
Add it to Ankra
- Portal
- CLI
Go to Integrations & alerts → Credentials, click Add credential, and under Cloud providers choose DigitalOcean. Enter:
- Name: 3 to 100 lowercase letters, digits and single hyphens (for example
do-prod). It cannot change later. - API token: the token from the previous step
ankra credentials digitalocean ssh-key create --name my-key --generate.
You can replace the token later under Settings & access → Replace the secret, without recreating the credential (see Replace the secret). Ankra checks the new token with DigitalOcean before it stores it.
credentials.write to add or replace the credential (the built-in owner and admin roles have it). See Credentials.
Listing DigitalOcean Credentials
Troubleshooting DigitalOcean Credentials
These are the answers Test the connection and Check now give:
If cost reconciliation shows the DigitalOcean credential as no billing access, the token lacks the
billing:read scope: DigitalOcean refused to list its invoices, so what it billed is shown as unknown, never as zero. Add the scope to a new token and replace it on the credential’s page; the next import (every six hours) reads the invoices.
The check verifies the token is accepted, not that it has every scope. If the credential saves fine but provisioning later fails with a permissions error, the token is read-only or missing a scope from the lists above - generate a token with the right scopes and replace it on the credential’s page.