# Docker Hub access-tokens API

**Canonical:** https://apis.io/apis/docker-hub/docker-hub-access-tokens-api/  
**Provider:** Docker Hub — https://apis.io/providers/docker-hub/  
**Base URL:** https://hub.docker.com/v2  
**Documentation:** https://docs.docker.com/docker-hub/api/latest/

Docker Hub access-tokens API is one of 10 APIs that [Docker Hub](https://apis.io/providers/docker-hub/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Access Tokens. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

The Personal Access Token endpoints lets you manage personal access tokens. For more information, see [Access Tokens](https://docs.docker.com/security/access-tokens/). You can use a personal access token instead of a password in the [Docker CLI](https://docs.docker.com/engine/reference/commandline/cli/) or in the [Create an authentication token](#operation/PostUsersLogin) route to obtain a bearer token. ### Scopes For each scope grouping (in this case "repo"), you only need to define 1 scope as any lower scopes are assumed. For example: If you define `repo:write`, the API assumes the scope of both `repo:read` *and* `repo:public_read` as well. If you were to define both `repo:write` *and* `repo:read`, then `repo:read` is assumed by `repo:write` and ignored. ***Treat your personal access token like your password and keep it secret. You cannot retrieve your token after it is generated.***

## Machine-readable artifacts (4)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/docker-hub/refs/heads/main/openapi/docker-hub-access-tokens-api-openapi.yml
- **Documentation** — https://docs.docker.com/docker-hub/api/latest/
- **BaseURL** — https://hub.docker.com/v2
- **APIsJSON** — https://raw.githubusercontent.com/api-evangelist/docker-hub/refs/heads/main/apis.yml

## Other Docker Hub APIs (9)

- [Docker Hub audit-logs API](https://apis.io/apis/docker-hub/docker-hub-audit-logs-api/)
- [Docker Hub authentication-api API](https://apis.io/apis/docker-hub/docker-hub-authentication-api-api/)
- [Docker Hub groups API](https://apis.io/apis/docker-hub/docker-hub-groups-api/)
- [Docker Hub invites API](https://apis.io/apis/docker-hub/docker-hub-invites-api/)
- [Docker Hub org-access-tokens API](https://apis.io/apis/docker-hub/docker-hub-org-access-tokens-api/)
- [Docker Hub org-settings API](https://apis.io/apis/docker-hub/docker-hub-org-settings-api/)
- [Docker Hub orgs API](https://apis.io/apis/docker-hub/docker-hub-orgs-api/)
- [Docker Hub repositories API](https://apis.io/apis/docker-hub/docker-hub-repositories-api/)
- [Docker Hub scim API](https://apis.io/apis/docker-hub/docker-hub-scim-api/)

## Tags

Access Tokens

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/docker-hub/docker-hub-access-tokens-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/docker-hub/.
