# 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"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ai.insly.com/nora/api-documentation/api-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
