Amazon CodeArtifact Authorization Token API

The Authorization Token API from Amazon CodeArtifact — 1 operation(s) for authorization token.

Operations 2

POST /v1/authorization-token#domain Amazon CodeArtifact Get Authorization Token #
POST /v1/authorization-token Get Authorization Token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-codeartifact:amazon-codeartifact-authorization-token-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-codeartifact-authorization-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Codeartifact Authorization Token API
  version: '2018-09-22'
  x-refined-note:
  - x-apiClientRegistration differs across the merged source definitions and was not carried
  - x-apisguru-categories differs across the merged source definitions and was not carried
  - x-aws-signingName differs across the merged source definitions and was not carried
  - x-logo differs across the merged source definitions and was not carried
  - x-origin differs across the merged source definitions and was not carried
  - x-preferred differs across the merged source definitions and was not carried
  - x-providerName differs across the merged source definitions and was not carried
  - x-release differs across the merged source definitions and was not carried
  - x-serviceName differs across the merged source definitions and was not carried
  description: 'Operations tagged Authorization Token across 2 of this provider''s published API definitions: amazon-codeartifact-openapi-original.yaml, amazon-codeartifact-authorization-token-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://codeartifact.{region}.amazonaws.com
  variables:
    region:
      description: The AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - us-gov-west-1
      - us-gov-east-1
      - ca-central-1
      - eu-north-1
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-south-1
      - af-south-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-northeast-3
      - ap-southeast-1
      - ap-southeast-2
      - ap-east-1
      - ap-south-1
      - sa-east-1
      - me-south-1
      default: us-east-1
  description: The CodeArtifact multi-region endpoint
- url: https://codeartifact.{region}.amazonaws.com
  variables:
    region:
      description: The AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - us-gov-west-1
      - us-gov-east-1
      - ca-central-1
      - eu-north-1
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-south-1
      - af-south-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-northeast-3
      - ap-southeast-1
      - ap-southeast-2
      - ap-east-1
      - ap-south-1
      - sa-east-1
      - me-south-1
      default: us-east-1
  description: The CodeArtifact multi-region endpoint
- url: http://codeartifact.{region}.amazonaws.com.cn
  variables:
    region:
      description: The AWS region
      enum:
      - cn-north-1
      - cn-northwest-1
      default: cn-north-1
  description: The CodeArtifact endpoint for China (Beijing) and China (Ningxia)
- url: https://codeartifact.{region}.amazonaws.com.cn
  variables:
    region:
      description: The AWS region
      enum:
      - cn-north-1
      - cn-northwest-1
      default: cn-north-1
  description: The CodeArtifact endpoint for China (Beijing) and China (Ningxia)
tags:
- name: Authorization Token
paths:
  /v1/authorization-token#domain:
    parameters:
    - $ref: '#/components/parameters/X-Amz-Content-Sha256'
    - $ref: '#/components/parameters/X-Amz-Date'
    - $ref: '#/components/parameters/X-Amz-Algorithm'
    - $ref: '#/components/parameters/X-Amz-Credential'
    - $ref: '#/components/parameters/X-Amz-Security-Token'
    - $ref: '#/components/parameters/X-Amz-Signature'
    - $ref: '#/components/parameters/X-Amz-SignedHeaders'
    post:
      operationId: GetAuthorizationToken
      description: 'Generates a temporary authorization token for accessing repositories in the domain. This API requires the codeartifact:GetAuthorizationToken and sts:GetServiceBearerToken permissions. For more information about authorization tokens, see CodeArtifact authentication and tokens.


        CodeArtifact authorization tokens are valid for a period of 12 hours when created with the login command. You can call login periodically to refresh the token. When you create an authorization token with the GetAuthorizationToken API, you can set a custom authorization period, up to a maximum of 12 hours, with the durationSeconds parameter.


        The authorization period begins after login or GetAuthorizationToken is called. If login or GetAuthorizationToken is called while assuming a role, the token lifetime is independent of the maximum session duration of the role. For example, if you call sts assume-role and specify a session duration of 15 minutes, then generate a CodeArtifact authorization token, the token will be valid for the full authorization period even though this is longer than the 15-minute session duration.


        See Using IAM Roles for more information on controlling session duration.'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAuthorizationTokenResult'
              examples:
                GetAuthorizationToken200Example:
                  summary: Default GetAuthorizationToken 200 response
                  x-microcks-default: true
                  value:
                    authorizationToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example
                    expiration: example-value
        '480':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
              examples:
                GetAuthorizationToken480Example:
                  summary: Default GetAuthorizationToken 480 response
                  x-microcks-default: true
                  value: example-value
        '481':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
              examples:
                GetAuthorizationToken481Example:
                  summary: Default GetAuthorizationToken 481 response
                  x-microcks-default: true
                  value: example-value
        '482':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
              examples:
                GetAuthorizationToken482Example:
                  summary: Default GetAuthorizationToken 482 response
                  x-microcks-default: true
                  value: example-value
        '483':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
              examples:
                GetAuthorizationToken483Example:
                  summary: Default GetAuthorizationToken 483 response
                  x-microcks-default: true
                  value: example-value
        '484':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
              examples:
                GetAuthorizationToken484Example:
                  summary: Default GetAuthorizationToken 484 response
                  x-microcks-default: true
                  value: '500123'
      parameters:
      - name: domain
        in: query
        required: true
        description: ' The name of the domain that is in scope for the generated authorization token. '
        schema:
          type: string
          pattern: '[a-z][a-z0-9\-]{0,48}[a-z0-9]'
          minLength: 2
          maxLength: 50
      - name: domain-owner
        in: query
        required: false
        description: ' The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. '
        schema:
          type: string
          pattern: '[0-9]{12}'
          minLength: 12
          maxLength: 12
      - name: duration
        in: query
        required: false
        description: The time, in seconds, that the generated authorization token is valid. Valid values are <code>0</code> and any number between <code>900</code> (15 minutes) and <code>43200</code> (12 hours). A value of <code>0</code> will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.
        schema:
          type: integer
          minimum: 0
          maximum: 43200
      summary: Amazon CodeArtifact Get Authorization Token
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      tags:
      - Authorization Token
      security:
      - hmac: []
    servers:
    - url: http://codeartifact.{region}.amazonaws.com
      variables:
        region:
          description: The AWS region
          enum:
          - us-east-1
          - us-east-2
          - us-west-1
          - us-west-2
          - us-gov-west-1
          - us-gov-east-1
          - ca-central-1
          - eu-north-1
          - eu-west-1
          - eu-west-2
          - eu-west-3
          - eu-central-1
          - eu-south-1
          - af-south-1
          - ap-northeast-1
          - ap-northeast-2
          - ap-northeast-3
          - ap-southeast-1
          - ap-southeast-2
          - ap-east-1
          - ap-south-1
          - sa-east-1
          - me-south-1
          default: us-east-1
      description: The CodeArtifact multi-region endpoint
    - url: https://codeartifact.{region}.amazonaws.com
      variables:
        region:
          description: The AWS region
          enum:
          - us-east-1
          - us-east-2
          - us-west-1
          - us-west-2
          - us-gov-west-1
          - us-gov-east-1
          - ca-central-1
          - eu-north-1
          - eu-west-1
          - eu-west-2
          - eu-west-3
          - eu-central-1
          - eu-south-1
          - af-south-1
          - ap-northeast-1
          - ap-northeast-2
          - ap-northeast-3
          - ap-southeast-1
          - ap-southeast-2
          - ap-east-1
          - ap-south-1
          - sa-east-1
          - me-south-1
          default: us-east-1
      description: The CodeArtifact multi-region endpoint
    - url: http://codeartifact.{region}.amazonaws.com.cn
      variables:
        region:
          description: The AWS region
          enum:
          - cn-north-1
          - cn-northwest-1
          default: cn-north-1
      description: The CodeArtifact endpoint for China (Beijing) and China (Ningxia)
    - url: https://codeartifact.{region}.amazonaws.com.cn
      variables:
        region:
          description: The AWS region
          enum:
          - cn-north-1
          - cn-northwest-1
          default: cn-north-1
      description: The CodeArtifact endpoint for China (Beijing) and China (Ningxia)
  /v1/authorization-token:
    post:
      operationId: postV1AuthorizationToken
      summary: Get Authorization Token
      description: Generates a temporary authorization token for accessing repositories in the domain. This API requires the codeartifact:GetAuthorizationToken and sts:GetServiceBearerToken permissions. For more information about authorization tokens, see CodeArtifact authentication and tokens. CodeArtifact authorization tokens are valid for a period of 12 hours when created with the login command. You can call login periodically to refresh the token. When you create an authorization token with the GetAuthorizationToken API, you can set a custom authorization period, up to a maximum of 12 hours, with the durationSeconds parameter. The authorization period begins after login or GetAuthorizationToken is called. If login or GetAuthorizationToken is called while assuming a role, the token lifetime is independent of the maximum session duration of the role. For example, if you call sts assume-role and specify a session duration of 15 minutes, then generate a CodeArtifact authorization token, the token will be valid for the full authorization period even though this is longer than the 15-minute session duration. See Using IAM Roles for more information on controlling session duration.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAuthorizationTokenResult_2'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException_2'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException_2'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException_2'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException_2'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException_2'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAuthorizationTokenRequest'
      tags:
      - Authorization Token
      security:
      - sigv4: []
      x-operation-id-source: normalized
      x-operation-id-original: GetAuthorizationToken
    servers:
    - url: https://codeartifact.{region}.amazonaws.com
      variables:
        region:
          default: us-east-1
components:
  parameters:
    X-Amz-Credential:
      name: X-Amz-Credential
      in: header
      schema:
        type: string
      required: false
    X-Amz-SignedHeaders:
      name: X-Amz-SignedHeaders
      in: header
      schema:
        type: string
      required: false
    X-Amz-Content-Sha256:
      name: X-Amz-Content-Sha256
      in: header
      schema:
        type: string
      required: false
    X-Amz-Signature:
      name: X-Amz-Signature
      in: header
      schema:
        type: string
      required: false
    X-Amz-Security-Token:
      name: X-Amz-Security-Token
      in: header
      schema:
        type: string
      required: false
    X-Amz-Algorithm:
      name: X-Amz-Algorithm
      in: header
      schema:
        type: string
      required: false
    X-Amz-Date:
      name: X-Amz-Date
      in: header
      schema:
        type: string
      required: false
  schemas:
    ResourceNotFoundException: {}
    AccessDeniedException: {}
    ThrottlingException: {}
    ValidationException: {}
    Timestamp:
      type: string
      format: date-time
    GetAuthorizationTokenResult:
      type: object
      properties:
        authorizationToken:
          allOf:
          - $ref: '#/components/schemas/String'
          - description: ' The returned authentication token. '
        expiration:
          allOf:
          - $ref: '#/components/schemas/Timestamp'
          - description: ' A timestamp that specifies the date and time the authorization token expires. '
    String:
      type: string
    InternalServerException: {}
    ResourceNotFoundException_2:
      type: object
      properties:
        message:
          type: string
        resourceId:
          type: string
          description: The ID of the resource.
        resourceType:
          type: string
          enum:
          - domain
          - repository
          - package
          - package-version
          - asset
          description: The type of Amazon Web Services resource.
      required:
      - message
    ThrottlingException_2:
      type: object
      properties:
        message:
          type: string
        retryAfterSeconds:
          type: integer
          description: The time period, in seconds, to wait before retrying the request.
      required:
      - message
    ValidationException_2:
      type: object
      properties:
        message:
          type: string
        reason:
          type: string
          enum:
          - CANNOT_PARSE
          - ENCRYPTION_KEY_ERROR
          - FIELD_VALIDATION_FAILED
          - UNKNOWN_OPERATION
          - OTHER
      required:
      - message
    GetAuthorizationTokenRequest:
      type: object
      properties:
        domain:
          type: string
          description: The name of the domain that is in scope for the generated authorization token.
        domainOwner:
          type: string
          description: The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
        durationSeconds:
          type: integer
          description: The time, in seconds, that the generated authorization token is valid. Valid values are 0 and any number between 900 (15 minutes) and 43200 (12 hours). A value of 0 will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.
      required:
      - domain
    GetAuthorizationTokenResult_2:
      type: object
      properties:
        authorizationToken:
          type: string
          description: The returned authentication token.
        expiration:
          type: string
          format: date-time
          description: A timestamp that specifies the date and time the authorization token expires.
    AccessDeniedException_2:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    InternalServerException_2:
      type: object
      properties:
        message:
          type: string
      required:
      - message
  securitySchemes:
    hmac:
      type: apiKey
      name: Authorization
      in: header
      description: Amazon Signature authorization v4
      x-amazon-apigateway-authtype: awsSigv4
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: codeartifact
externalDocs:
  description: Amazon Web Services documentation
  url: https://docs.aws.amazon.com/codeartifact/
x-refined-from:
- amazon-codeartifact-openapi-original.yaml
- amazon-codeartifact-authorization-token-api-openapi.yml
x-hasEquivalentPaths: true