---
title: "POST /2025-09-09/microvms/{microvmIdentifier}/auth-token"
method: POST
path: "/2025-09-09/microvms/{microvmIdentifier}/auth-token"
---

# POST /2025-09-09/microvms/{microvmIdentifier}/auth-token

`POST /2025-09-09/microvms/{microvmIdentifier}/auth-token`

Creates an authentication token for accessing a running MicroVM. The token grants access to the specified ports on the MicroVM endpoint.

## Path parameters

- `microvmIdentifier` string, required — The ARN or ID of the MicroVm

## Request body

- object
  - `expirationInMinutes` integer, required — The duration in minutes before the authentication token expires. Maximum: 60 minutes.
  - `allowedPorts` PortSpecification[], required — A list of port specifications.
    - `port` integer — A single port number.
    - `range` object — A range of ports.
      - `startPort` integer, required — The starting port number of the range.
      - `endPort` integer, required — The ending port number of the range.
    - `allPorts` object — Indicates that all ports are accessible.

## Response `200`

Success

- CreateMicrovmAuthTokenResponse
  - `authToken` object, required — A map containing the authentication token. Use the value at key "X-aws-proxy-auth" as the header value when connecting to the MicroVM endpoint.

## Other responses

- `480` — InternalServerException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException
- `483` — ThrottlingException
- `484` — ValidationException

---

[API](https://skmtc.net/aws/apis/lambda-microvms.md) · [All operations](https://skmtc.net/aws/apis/lambda-microvms/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lambda-microvms/versions/83f10af82eb8/schema)
