> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flipt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Token

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://try.flipt.io/auth/v1/method/token \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <token>' \
    --data '{
    "description": "<description>",
    "name": "<name>"
  }'
  ```
</RequestExample>


## OpenAPI

````yaml POST /auth/v1/method/token
openapi: 3.0.3
info:
  title: api
  version: 1.47.0
servers:
  - url: http://localhost:8080
security:
  - bearerAuth: []
tags:
  - name: AuthenticationMethodKubernetesService
  - name: AuthenticationMethodOIDCService
  - name: AuthenticationMethodTokenService
  - name: AuthenticationService
  - name: EvaluationService
  - name: Flipt
  - name: OFREPService
paths:
  /auth/v1/method/token:
    post:
      tags:
        - AuthenticationMethodTokenService
      operationId: createMethodToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenResponse'
components:
  schemas:
    CreateTokenRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        expiresAt:
          type: string
          format: date-time
        namespaceKey:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
    CreateTokenResponse:
      type: object
      properties:
        clientToken:
          type: string
        authentication:
          $ref: '#/components/schemas/Authentication'
    Authentication:
      type: object
      properties:
        id:
          type: string
        method:
          enum:
            - METHOD_NONE
            - METHOD_TOKEN
            - METHOD_OIDC
            - METHOD_KUBERNETES
            - METHOD_GITHUB
            - METHOD_JWT
            - METHOD_CLOUD
          type: string
          format: enum
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````