I was reviewing the DockerHub API documentation, and in the authentication section, it states that both passwords and Personal Access Tokens (PATs) can be used to generate a token for accessing the Hub APIs.
I generated a token using my username and PAT via the endpoint:
🔗 https://hub.docker.com/v2/users/login
However, when I use this token with any documented API, I receive a 403 Forbidden error with the following response:
{
"message": "token issued from personal access token",
"errinfo": {}
}
On the other hand, when I use my username and password to generate a token, that token works perfectly with the APIs.
Is this behavior intentional (meaning the documentation is incorrect), or is it a bug?
Additionally, some undocumented endpoints like:
🔗 https://hub.docker.com/v2/orgs/<user_name>
do work with a PAT-generated token, making the authentication flow even more confusing.
Could you clarify this?
I was reviewing the DockerHub API documentation, and in the authentication section, it states that both passwords and Personal Access Tokens (PATs) can be used to generate a token for accessing the Hub APIs.
I generated a token using my username and PAT via the endpoint:
🔗
https://hub.docker.com/v2/users/loginHowever, when I use this token with any documented API, I receive a 403 Forbidden error with the following response:
{ "message": "token issued from personal access token", "errinfo": {} }On the other hand, when I use my username and password to generate a token, that token works perfectly with the APIs.
Is this behavior intentional (meaning the documentation is incorrect), or is it a bug?
Additionally, some undocumented endpoints like:
🔗
https://hub.docker.com/v2/orgs/<user_name>do work with a PAT-generated token, making the authentication flow even more confusing.
Could you clarify this?