---
title: "POST /tokens/{dnsViewId}"
method: POST
path: "/tokens/{dnsViewId}"
---

# POST /tokens/{dnsViewId}

`POST /tokens/{dnsViewId}`

Creates an access token for a DNS view. Access tokens provide token-based authentication for DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) connections to the Route 53 Global Resolver.

Route 53 Global Resolver is a global service that supports resolvers in multiple Amazon Web Services Regions but you must specify the US East (Ohio) Region to create, update, or otherwise work with Route 53 Global Resolver resources. That is, for example, specify `--region us-east-2` on Amazon Web Services CLI commands.

## Path parameters

- `dnsViewId` string, required

## Request body

- object
  - `clientToken` string — A unique, case-sensitive identifier to ensure idempotency. This means that making the same request multiple times with the same <code>clientToken</code> has the same result every time.
  - `expiresAt` string, date-time — The date and time when the token expires. Tokens can have a minimum expiration of 30 days and maximum of 365 days from creation.
  - `name` string — A descriptive name for the access token.
  - `tags` object — An array of user-defined keys and optional values. These tags can be used for categorization and organization.

## Response `200`

Success

- CreateAccessTokenOutput
  - `id` string, required — The unique identifier for the access token.
  - `arn` string, required — The Amazon Resource Name (ARN) of the access token.
  - `clientToken` string — The unique string that identifies the request and ensures idempotency.
  - `createdAt` string, date-time, required — The date and time when the access token was created.
  - `dnsViewId` string, required — The ID of the DNS view associated with this access token.
  - `expiresAt` string, date-time, required — The date and time when the access token expires.
  - `name` string — The name of the access token.
  - `status` 'CREATING' | 'OPERATIONAL' | 'DELETING', required — The operational status of the access token.
  - `value` string, password, required — The access token value. This token should be included in DoH and DoT requests for authentication. Keep this value secure as it provides access to your Route 53 Global Resolver.

## Other responses

- `480` — InternalServerException
- `481` — ValidationException
- `482` — ConflictException
- `483` — ServiceQuotaExceededException
- `484` — AccessDeniedException
- `485` — ThrottlingException
- `486` — ResourceNotFoundException

---

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