# API Token

Token generation and management

## Get API access token

> Exchange API client credentials for an access token. Use this token in the Authorization header as "Bearer \<token>" for authenticated API requests.

```json
{"openapi":"3.0.0","info":{"title":"Formflow API","version":"1.0"},"tags":[{"name":"API Token","description":"Token generation and management"}],"paths":{"/api/token":{"post":{"description":"Exchange API client credentials for an access token. Use this token in the Authorization header as \"Bearer <token>\" for authenticated API requests.","operationId":"TokenController_getToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientsRequestDto"}}}},"responses":{"200":{"description":"Successfully authenticated and returned access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenResponseDto"}}}},"400":{"description":"Bad request - missing or invalid parameters"},"401":{"description":"Invalid credentials or unauthorized"}},"summary":"Get API access token","tags":["API Token"]}}},"components":{"schemas":{"ApiClientsRequestDto":{"type":"object","properties":{"clientId":{"type":"string","description":"The API client ID provided when the API client was created"},"clientSecret":{"type":"string","description":"The API client secret provided when the API client was created"},"organizationId":{"type":"string","description":"The organization ID associated with this API client"}},"required":["clientId","clientSecret","organizationId"]},"GetTokenResponseDto":{"type":"object","properties":{"token":{"type":"string","description":"JWT access token to use for authenticated API requests"},"token_type":{"type":"string","description":"Type of token (always \"Bearer\")"},"expires_in":{"type":"number","description":"Token expiration time in seconds"}},"required":["token","token_type","expires_in"]}}}}
```
