Get Access Token

View as Markdown
### **Overview** Exchanges an authorization code or a refresh token for a persistent access token. This is the first step in interacting with the KiwiForm API. ### **Request Body (form-data)** | Key | Type | Description | | --- | --- | --- | | `grant_type` | `string` | **Required.** Use `authorization_code` or `refresh_token`. | | `client_id` | `string` | Your unique Application Client ID. **Required** for `authorization_code`. Optional for `refresh_token`. | | `client_secret` | `string` | Your Application Secret Key. **Required** for `authorization_code`. Optional for `refresh_token`. | | `code` | `string` | Required if `grant_type` is `authorization_code`. | | `refresh_token` | `string` | Required if `grant_type` is `refresh_token`. | ### **Response Attributes** - `access_token` (string): The token used for authentication. - `refresh_token` (string): Token used to obtain a new access token. - `expires_in` (integer): Time in seconds until the token expires.

Request

This endpoint expects an object.
grant_typestringRequired
client_idstringRequired
client_secretstringRequired
refresh_tokenstringRequired

Response

OK
access_tokenstring
refresh_tokenstring
expires_ininteger
token_typestring