v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1441293181.2 KB

Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.

The authorizationToken returned is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. The CLI offers an get-login-password command that simplifies the login process. For more information, see Registry authentication in the Amazon Elastic Container Registry User Guide.

post/#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken

Headers

X-Amz-Target'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken' required

Request body

registryIdsRegistryId[]

A list of Amazon Web Services account IDs that are associated with the registries for which to get AuthorizationData objects. If you do not specify a registry, the default registry is assumed.This field is deprecated. The returned authorization token can be used to access any Amazon ECR registry that the IAM principal has access to, specifying a registry ID doesn't change the permissions scope of the authorization token.

Response

Success

Example response

{
  "authorizationData": [
    {
      "authorizationToken": "QVdTOkN...",
      "expiresAt": "1470951892432",
      "proxyEndpoint": "https://012345678901.dkr.ecr.us-west-2.amazonaws.com"
    }
  ]
}