Amazon CodeArtifact Authorization Token API

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

GitHub OpenAPI

Operations 1

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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.1.0
info:
  title: CodeArtifact Authorization Token API
  version: '2018-09-22'
  description: Generated from AWS's published Smithy model for CodeArtifact. 1 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://codeartifact.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /v1/authorization-token:
    post:
      operationId: GetAuthorizationToken
      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'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: domain
        in: query
        required: true
        schema:
          type: string
        description: The name of the domain that is in scope for the generated authorization token.
      - name: domain-owner
        in: query
        schema:
          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.
      - name: duration
        in: query
        schema:
          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.
      tags:
      - Authorization Token
components:
  securitySchemes:
    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
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    GetAuthorizationTokenResult:
      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.
    InternalServerException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    ResourceNotFoundException:
      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:
      type: object
      properties:
        message:
          type: string
        retryAfterSeconds:
          type: integer
          description: The time period, in seconds, to wait before retrying the request.
      required:
      - message
    ValidationException:
      type: object
      properties:
        message:
          type: string
        reason:
          type: string
          enum:
          - CANNOT_PARSE
          - ENCRYPTION_KEY_ERROR
          - FIELD_VALIDATION_FAILED
          - UNKNOWN_OPERATION
          - OTHER
      required:
      - message
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/codeartifact/service/2018-09-22/codeartifact-2018-09-22.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)