[metadata]
color-scheme: light dark
description: Create a personal access token for use with the DigitalOcean API.
generator: Hugo 0.161.1
google-site-verification: CAYPZwe7daX8KlYYZfB4VMjfT4g8Tqrrc4Q3g_wMvI8
keywords: DigitalOcean, cloud computing
og:site_name: DigitalOcean
og:type: article
twitter:card: summary_large_image
twitter:creator: @DigitalOcean
twitter:site: DigitalOcean
twitter:url: https://docs.digitalocean.com/reference/api/create-personal-access-token/
viewport: width=device-width, initial-scale=1

[canonical-links]
https://docs.digitalocean.com/reference/api/create-personal-access-token/

[document-links]
API Reference: https://docs.digitalocean.com/reference/api
APIs: /reference/api/
About: https://www.digitalocean.com/about
Access Metadata: /products/droplets/how-to/access-metadata/
Ansible: /reference/ansible/
Blog: https://www.digitalocean.com/blog
CLI Reference: https://docs.digitalocean.com/reference/doctl
CRUD scopes: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
Careers: https://www.digitalocean.com/careers
Code of Conduct: https://www.digitalocean.com/community/pages/code-of-conduct
Create an Access Token: /reference/api/create-personal-access-token/
Currents Research: https://www.digitalocean.com/currents
DigitalOcean API: /reference/api/#digitalocean
Docs Home: https://docs.digitalocean.com
Docs: https://docs.digitalocean.com/
Give Feedback: https://ideas.digitalocean.com/documentation
Legal: https://www.digitalocean.com/legal
Libraries: /reference/libraries/
MCP Server: /reference/mcp/
Manage Model Access Keys: /products/inference/how-to/manage-model-access-keys/
Metadata API: /reference/api/#metadata
OAuth API: /reference/api/oauth/
Open Source: /reference/opensource/
Paperspace: /reference/paperspace/
Platform: https://docs.digitalocean.com/platform/
Products: https://docs.digitalocean.com/products/
PyDo: /reference/pydo/
Q&A: https://www.digitalocean.com/community/questions
Reference: /reference/api/digitalocean/
Reference: /reference/api/metadata/
Reference: /reference/api/reference/
Reference: /reference/api/spaces/
Reference: https://docs.digitalocean.com/reference/
Release Notes: https://docs.digitalocean.com/release-notes
Report Abuse: https://www.digitalocean.com/company/contact/abuse
Sign Up: https://cloud.digitalocean.com/registrations/new
Spaces API: /reference/api/#spaces
Support Center: /support
Support: https://docs.digitalocean.com/support/
Terraform: /reference/terraform/
Token Scopes: /reference/api/scopes/
Trust Platform: https://www.digitalocean.com/trust
Tutorials: https://www.digitalocean.com/community/tutorials
View page as Markdown: /reference/api/create-personal-access-token/index.html.md
Write for DOnations: https://www.digitalocean.com/community/pages/write-for-digitalocean
api:read: /reference/api/scopes/api/read/
api:write: /reference/api/scopes/api/write/
doctl CLI: /reference/doctl/
had two scopes: /notes/2024/custom-scope-token-ga/
https://discord.gg/digitalocean
https://docs.digitalocean.com/llms.txt: https://docs.digitalocean.com/llms.txt
https://github.com/digitalocean
https://www.facebook.com/DigitalOceanCloudHosting
https://www.instagram.com/thedigitalocean
https://www.linkedin.com/company/digitalocean
https://www.youtube.com/DigitalOcean
https://x.com/digitalocean
llms.txt: https://docs.digitalocean.com/llms.txt
public API endpoint: /reference/api/reference/
team role: /platform/teams/roles/
the DigitalOcean Control Panel: https://cloud.digitalocean.com

[structured-data]
{"@context":"https://schema.org","@type":"TechArticle","author":{"@type":"Organization","name":"DigitalOcean","url":"https://www.digitalocean.com"},"dateModified":"2026-07-13","datePublished":"2018-06-19","description":"Create a personal access token for use with the DigitalOcean API.","headline":"How to Create a Personal Access Token","image":"https://www.digitalocean.com/_next/static/media/intro-to-cloud.d49bc5f7.jpeg","inLanguage":"en","keywords":"DigitalOcean, cloud computing","mainEntityOfPage":{"@id":"https://docs.digitalocean.com/reference/api/create-personal-access-token/","@type":"WebPage"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://www.digitalocean.com/_next/static/media/logo.b31e883e.svg"},"name":"DigitalOcean"}}

[content]
How to Create a Personal Access Token | DigitalOcean Documentation
Docs
Platform
Products
Reference
Support
Sign Up
doctl CLI
APIs
DigitalOcean API
Reference
Create an Access Token
Manage Model Access Keys
Spaces API
Reference
OAuth API
Metadata API
Reference
Access Metadata
Token Scopes
Reference
MCP Server
Paperspace
Ansible
Terraform
PyDo
Libraries
Open Source
APIs
DigitalOcean API
Create an Access Token
Give Feedback
For AI agents:
The documentation index is at
https://docs.digitalocean.com/llms.txt
. Markdown versions of pages use the same URL with
index.html.md
in place of the HTML page (for example, append
index.html.md
to the directory path instead of opening the HTML document).
How to Create a Personal Access Token
Last verified 13 Jul 2026
Copy page as Markdown
View page as Markdown
To use the DigitalOcean API, you need to generate a personal access token. Personal access tokens function like ordinary OAuth access tokens. You use them to authenticate to the API by including one in a bearer-type
Authorization
header with your request.
Warning
Keep your tokens secret.
They function like passwords. Do not hard code your tokens into programs where they may accidentally be released in version control and are harder to rotate. Instead, use environment variables. If a token becomes compromised, delete it to revoke that token’s access.
About Custom Scopes
Previously, DigitalOcean personal access tokens (PATs)
had two scopes
: read access to all team resources or full (read and write) access to all team resources.
Custom scopes grant more specific permissions, like only creating Droplets or updating cloud firewalls, which lets you secure your workflows by granting only the permissions the token needs and restricting access to other resources and actions.
Generally, the
CRUD scopes
map to equivalent actions on the associated kind of resource:
Create
scope lets you create the resource type and perform additive actions within that resource type. For example,
database:create
lets you create database clusters and create new users or databases within that cluster.
Read
scope lets you view information about a resource by type and also view information that the resource returns. For example,
app:read
lets you view App Platform apps and their logs.
Update
scope allows you modify a resource type and perform actions that would otherwise modify a resource. For example,
droplet:update
lets you power a Droplet on or off.
Delete
scope lets you delete a resource by type and perform actions that delete information about the resource type. For example,
database:delete
lets you delete databases from a database cluster and remove existing users from a database.
Each custom scope correlates to one
public API endpoint
.
Creating a Token
To generate a personal access token, log in to
the DigitalOcean Control Panel
.
In the main menu, click
Account
, then click
API
to open the
Applications & API
page on the
Tokens
tab. In the
Personal access tokens
section, click the
Generate New Token
button.
On the
Create A New Personal Access Token
page, fill out the fields:
Token name
. Choose a name for the token. This is for your own reference.
Expiration
. Choose when the token expires. After the interval passes, the token can no longer authenticate you to the API and it disappears from your account.
Scopes
. Choose the permissions that define which resources and actions the token can access. The available options are based on your
team role
.
Custom Scopes
lets you select specific scopes from the full list of scopes available to you based on your team role.
If a team owner expands the permissions of your team role, a token with custom scopes maintains its original scopes and does not include any new scopes.
Read Only
grants the token the
api:read
alias scope, which provides read access to all resources available based on the permissions of your team role.
If a team owner expands the read permissions of your team role, a read only token reflects the updated permissions.
Full Access
grants the token the
api:write
alias scope, which provides full access to all resources available based on the permissions of your team role.
If a team owner expands the permissions of your team role, a full access token reflects the updated permissions.
If a team owner restricts the permissions of your team role, those permissions are also no longer available to any existing tokens.
You can use the
Quick bulk scope select
to select all scopes for any CRUD action,
Search by resource type
to look for a scope by name, or select and expand sections in the full list:
The bottom of the page displays the summary of custom chosen scopes. When you finish selecting your options, click
Generate Token
to create the token and return to the
Applications & API
page. Save the displayed token. For security purposes, the secret is only shown once.
You can use tokens with custom scopes in the same way as previous tokens. If you try to use a token to call an endpoint that requires a scope the token does not have, the API returns a 403 Forbidden response.
Managing Tokens with Custom Scopes
In the
Personal access tokens
section, you can view the scopes for existing tokens.
You can click the entry in the
Scopes
column to view details about the token’s usage and scopes.
In the
…
menu for a token, you can rename, regenerate, or delete the token.
Limits
You cannot edit the scope of a token after creation. You can rename and regenerate tokens with custom scopes.
In this article...
About Custom Scopes
Creating a Token
Managing Tokens with Custom Scopes
Limits
Company
About
Careers
Blog
Docs
Docs Home
API Reference
CLI Reference
Release Notes
llms.txt
Trust Platform
Community
Tutorials
Q&A
Write for DOnations
Currents Research
Legal
Code of Conduct
Support
Support Center
Report Abuse
© 2026 DigitalOcean, LLC. All rights reserved
We can't find any results for your search.
Try using different keywords or simplifying your search terms.
