---
title: "POST /auth/v1/method/token"
method: POST
path: "/auth/v1/method/token"
tags: ["AuthenticationMethodTokenService"]
---

# POST /auth/v1/method/token

`POST /auth/v1/method/token`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/auth/v1/method/token`
- Auth: HTTP bearer

## Request body

- CreateTokenRequest
  - `name` string
  - `description` string
  - `expiresAt` string, date-time
  - `namespaceKey` string
  - `metadata` object

## Response `200`

OK

- CreateTokenResponse
  - `clientToken` string
  - `authentication` Authentication
    - `id` string
    - `method` 'METHOD_NONE' | 'METHOD_TOKEN' | 'METHOD_OIDC' | 'METHOD_KUBERNETES' | 'METHOD_GITHUB' | 'METHOD_JWT' | 'METHOD_CLOUD', enum
    - `expiresAt` string, date-time
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `metadata` object

## Changes

- **2024-08-08** `594afc3dbe2e`: 1 breaking, 7 warning
  - the `authentication/method` response's property type changed from `integer` to `string` for status `200`
  - added the new `METHOD_CLOUD` enum value to the `authentication/method` response property for the response status `200`
  - added the new `METHOD_GITHUB` enum value to the `authentication/method` response property for the response status `200`
  - added the new `METHOD_JWT` enum value to the `authentication/method` response property for the response status `200`
  - …4 more
- **2024-08-07** `291b2f802c58`: 1 breaking, 7 info
  - the `authentication/method` response's property type changed from `string` to `integer` for status `200`
  - removed the `METHOD_CLOUD` enum value from the `authentication/method` response property for the response status `200`
  - removed the `METHOD_GITHUB` enum value from the `authentication/method` response property for the response status `200`
  - removed the `METHOD_JWT` enum value from the `authentication/method` response property for the response status `200`
  - …4 more

[Operation history](https://skmtc.dev/flipt-io/apis/flipt-api/changes/auth/v1/method/token/post.md)

---

[API](https://skmtc.dev/flipt-io/apis/flipt-api.md) - [All operations](https://skmtc.dev/flipt-io/apis/flipt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flipt-io/apis/flipt-api/revisions/6fe4caf26f13?raw)
