---
title: "Retrieve Authentication Token"
method: POST
path: "/auth/token"
tags: ["Authentication"]
---

# Retrieve Authentication Token

`POST /auth/token`

## Request

- Base URL: `https://api.morningconsult.com/v1`
- URL: `https://api.morningconsult.com/v1/auth/token`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/morningconsult/apis/morning-consult-api/docs/auth/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Exchange credentials for JWT and Refresh tokens. The returned tokens are required to use other API endpoints and to retrieve new tokens before they expire.
For initial authentication, supply your username and password with the Basic authorization format header. For subsequent authentications, use the refresh token in the Bearer format.

## Response `200`

Auth Tokens

- Tokens
  - `token_type` string: The type of token received. Will be Bearer.
  - `expires_in` integer: The number of seconds until the token expires.
  - `refresh_token` string: The refresh token to be used to retrieve a new JWT.
  - `id_token` string: The JWT token. Use this in the Authorization header in requests to other endpoints.

## Other responses

- `400`: Invalid Credentials
- `500`: Internal Server Error

---

[API](https://skmtc.dev/morningconsult/apis/morning-consult-api.md) - [All operations](https://skmtc.dev/morningconsult/apis/morning-consult-api/llms.txt) - [OpenAPI document](https://skmtc.dev/morningconsult/apis/morning-consult-api/revisions/70d621a9c59c?raw)
