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

# Generate tokens

> Generate Access and Refresh Tokens from your Authentication Code

<Info>Please note that the base URL for this endpoint is: `https://manage.mijnklantportaal.nl`</Info>

#### Body

<ParamField body="grant_type" type="string" required>
  Type of grant you want generate tokens for. Must be always `authorization_code`.
</ParamField>

<ParamField body="client_id" type="string" required>
  ID of your application which you got the Authentication Code for.
</ParamField>

<ParamField body="client_secret" type="string" required>
  The secret of your application you got after registering it in the Developer portal.
</ParamField>

<ParamField body="redirect_uri" type="string" required>
  The redirect URL as registered in the Developer portal.
</ParamField>

<ParamField body="code" type="string" required>
  The Authentication Code you got on the redirect back to your application.
</ParamField>

#### Response

<ResponseField name="access_token" type="string">
  The `Bearer` token you can use for accessing the MijnKlantportaal API.
</ResponseField>

<ResponseField name="refresh_token" type="string">
  The token you need to generate a new Access Token after it is expired.
</ResponseField>

<ResponseField name="expires_in" type="integer">
  Amount of seconds until the given Access Token expires.
</ResponseField>
