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

# Mint a token pair

> Issues a fresh access + refresh token for this user. Equivalent to calling
`POST /oauth/token` with `grant_type=managed_user`; provided here so you
never need to keep a token you have lost.



## OpenAPI

````yaml /openapi/managed.json post /users/{userId}/tokens
openapi: 3.1.0
info:
  title: Synci
  version: '1.0'
  description: >-
    Register and manage the end users your Managed app pays for. Authenticate
    with HTTP Basic using your app's client id and client secret. See the
    Managed apps guide for the full flow.
servers:
  - url: https://api.synci.io/managed/v1
security:
  - basicAuth: []
tags:
  - name: Managed Users
  - name: Managed Connections
  - name: Managed Webhooks
paths:
  /users/{userId}/tokens:
    post:
      tags:
        - Managed Users
      summary: Mint a token pair
      description: >-
        Issues a fresh access + refresh token for this user. Equivalent to
        calling

        `POST /oauth/token` with `grant_type=managed_user`; provided here so you

        never need to keep a token you have lost.
      operationId: managed.users.tokens
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
components:
  securitySchemes:
    basicAuth:
      type: http
      description: |-
        **Username = your client id. Password = your client secret.**

        So the base64-encoded `username:password` described below is
        `client_id:client_secret`:

        ```
        Authorization: Basic base64(YOUR_CLIENT_ID:YOUR_CLIENT_SECRET)
        ```

        Most HTTP clients build that header for you:

        ```bash
        curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
             https://api.synci.io/managed/v1/users
        ```

        Both values come from **Developers → Apps → your app**. The
        secret is shown once at creation and is prefixed `oac_`.
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.