Skip to main content
DigitalOcean API credentials store a DigitalOcean personal access token, used to provision and manage self-managed DigitalOcean droplet clusters and DigitalOcean Kubernetes (DOKS). The token is validated when you save it - Ankra makes a read-only call to the DigitalOcean API (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

  1. Log in to the DigitalOcean Control Panel
  2. Go to API → Tokens → Generate New Token
  3. Give it Read & Write access - with Full Access scopes, or custom scopes covering at least droplet, ssh_key, vpc, firewall, tag, load_balancer, and kubernetes (add regions and sizes read for the wizard’s options, and billing:read so Ankra can import your invoices for cost reconciliation)
  4. Copy the token (prefixed with dop_v1_; shown once)
2

Add it to Ankra

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
Click Test the connection. You see The connection works. Then click Add credential; the credential’s page opens.
For self-managed droplet clusters you also need an SSH key credential - create one with 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.
You need a role with 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.