---
title: "Issue a new token."
method: POST
path: "/cm/v1/auth/tokens"
tags: ["Token"]
---

# Issue a new token.

`POST /cm/v1/auth/tokens`

## Request

- Base URL: `https://api.moloco.cloud`
- URL: `https://api.moloco.cloud/cm/v1/auth/tokens`
- Auth: none required
- TypeScript: <https://skmtc.dev/moloco/apis/moloco-ads-campaign-management-api/docs/cm/v1/auth/tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Issues a new token that gives you access to Moloco Ads APIs.
Tokens are issued by workplace such that you need a unique token for each workplace you would like access to.
Each token is valid for 16 hours, and you will need a new token after the token has expired.

## Request body

- MessagesCreateTokenRequest
  - `api_key` string: Enter the API key generated from Moloco Cloud DSP.

## Response `200`

A successful response.

- MessagesCreateTokenResponse
  - `token` string: Created token.
  - `token_type` 'UNKNOWN_TYPE' | 'AUTH_TOKEN' | 'UPDATE_PASSWORD_TOKEN': TokenType enumerates the type of token. - AUTH_TOKEN: Token returned on the authentication success. - UPDATE_PASSWORD_TOKEN: If user didn't update password for over 12 months, it will return `UPDATE_PASSWORD_TOKEN`. This token can be only used for [UpdatePassword API](https://developer.moloco.cloud/reference/dspapi_updatepassword-1). https://developer.moloco.cloud/reference/dspapi_updatepassword-1

## Other responses

- `default`: Error. Detailed cause can be found in the `details` field.

---

[API](https://skmtc.dev/moloco/apis/moloco-ads-campaign-management-api.md) - [All operations](https://skmtc.dev/moloco/apis/moloco-ads-campaign-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/moloco/apis/moloco-ads-campaign-management-api/revisions/fa372006b0f6?raw)
