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

# Create an SDK Token

> Generates a short-lived SDK token used to initialize the Auth SDK. The token expires after 20 minutes.



## OpenAPI

````yaml /api-reference/v1.json post /link/token/create
openapi: 3.0.4
info:
  title: Deck API
  description: "# Deck API makes it straightforward for users to connect to any portal securely and quickly.\r\n\r\n### Welcome! Looking for a quick introduction to our API? Check out the 🚀[Quickstart guide](https://docs.deck.co/guides/guides/quickstart).\r\n\r\nGetting started is easy:\r\n\r\n1. Create an account using the [dashboard](https://dashboard.deck.co) to get your client id and secret\r\n2. Enter your client id and secret in the Authentication section below\r\n3. Hit the \"Try\" buttons below for each endpoint.\r\n\r\nHappy querying!"
  contact:
    name: Ready to start building? Contact us!
    url: https://deck.co
  version: v1
servers:
  - url: https://live.deck.co/api/v1
    description: Deck API
  - url: https://sandbox.deck.co/api/v1
    description: Deck Sandbox API (Enterprise only)
security: []
tags:
  - name: Agents
    description: Agent management
  - name: Connection
    description: Manage connections
  - name: Connections
    description: Endpoints for creating and managing workflow connections.
  - name: Decks
    description: Endpoints related to decks.
  - name: Jobs
    description: Endpoints related to jobs.
  - name: Sources
    description: Endpoints for managing and searching data sources
  - name: Link
    description: >-
      These endpoints are used by the Link widget. They can also be used for
      creating your own UX experience and connecting data from utility data
      sources.
paths:
  /link/token/create:
    post:
      tags:
        - Auth SDK
      summary: Create an SDK Token
      description: >-
        Generates a short-lived SDK token used to initialize the Auth SDK. The
        token expires after 20 minutes.
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenCreateRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenCreateRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenCreateRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenRequestResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenRequestResponse
            application/json+encrypted:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenRequestResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Common_WebModels_Models_ErrorMessageResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Common_WebModels_Models_ErrorMessageResponse
            application/json+encrypted:
              schema:
                $ref: >-
                  #/components/schemas/Datadeck_Common_WebModels_Models_ErrorMessageResponse
        '401':
          description: Unauthorized - Invalid API key
      security:
        - client_id: []
          secret: []
components:
  schemas:
    Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenCreateRequest:
      type: object
      properties:
        language:
          allOf:
            - $ref: '#/components/schemas/Datadeck_Api_Business_Models_LanguageEnum'
          description: The language that Link should be displayed in.
          nullable: true
        customization_name:
          type: string
          description: >-
            The name of the customization from Deck dashboard to be applied to
            this Widget session. If not specified, the default customization
            will be used. Values provided in this payload override the dashboard
            customization settings.
          nullable: true
        source_ids:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            You can specify exactly the sources to be shown in Link by providing
            a list of source ids.
          nullable: true
        webhook_url:
          type: string
          description: The webhook URL to receive update events.
          nullable: true
      additionalProperties: false
    Datadeck_Api_WebModels_Models_Api_V1_Link_LinkTokenRequestResponse:
      required:
        - link_token
      type: object
      properties:
        link_token:
          minLength: 1
          type: string
          description: >-
            The link_token, must be provided when calling Link endpoints, for
            identifying the Link session.
      additionalProperties: false
    Datadeck_Common_WebModels_Models_ErrorMessageResponse:
      type: object
      properties:
        error_category:
          allOf:
            - $ref: >-
                #/components/schemas/Datadeck_Api_Application_Models_Exceptions_Api_ErrorCategoryEnum
          description: A broad categorization of the error. Safe for programmatic use.
        error_code:
          allOf:
            - $ref: >-
                #/components/schemas/Datadeck_Api_Application_Models_Exceptions_Api_ErrorCodeEnum
          description: The particular error code. Safe for programmatic use.
        error_message:
          type: string
          description: >-
            A developer-friendly representation of the error code. This may
            change over time and is not safe for programmatic use.
        display_message:
          type: string
          description: >-
            A user-friendly representation of the error code. null if the error
            is not related to user action. This may change over time and is not
            safe for programmatic use.
          nullable: true
      additionalProperties: false
    Datadeck_Api_Business_Models_LanguageEnum:
      enum:
        - EN
        - ES
        - FR
        - DE
        - PT
      type: string
    Datadeck_Api_Application_Models_Exceptions_Api_ErrorCategoryEnum:
      enum:
        - INVALID_REQUEST
        - INVALID_RESULT
        - INVALID_INPUT
        - DATA_SOURCE_ERROR
        - RATE_LIMIT_EXCEEDED
        - API_ERROR
        - CONNECTION_ERROR
        - RECAPTCHA_ERROR
        - FETCH_BALANCE
        - ADD_PAYMENT_METHOD
        - FETCH_PAYMENT_METHODS
        - PAYMENT
      type: string
    Datadeck_Api_Application_Models_Exceptions_Api_ErrorCodeEnum:
      enum:
        - DATA_SOURCE_NOT_FOUND
        - DATA_SOURCE_NOT_RESPONDING
        - PRODUCT_NOT_READY
        - CONNECTION_NOT_FOUND
        - CONNECTION_FAILED
        - INVALID_CREDENTIALS
        - LIVE_CONNECTIVITY_NOT_ENABLED
        - PRODUCT_NOT_ENABLED
        - NO_ACCOUNTS
        - NO_STATEMENTS
        - CONNECTION_LOCKED
        - BLOCKED_BY_PIN
        - VALIDATION_FAILED
        - INVALID_API_KEYS
        - INVALID_LINK_TOKEN
        - INVALID_PUBLIC_TOKEN
        - INVALID_ACCESS_TOKEN
        - INVALID_ACCOUNT_ID
        - INVALID_STATEMENT_ID
        - CONSENT_REQUIRED
        - INVALID_CURP
        - INVALID_DOCUMENT_UPLOAD
        - INVALID_ARGUMENT
        - INPUT_VALUES
        - NOT_SUPPORTED
        - UNEXPECTED_ERROR
        - PLANNED_MAINTENANCE
        - SECURITY_QUESTION_NOT_FOUND
        - SECURITY_CAPTCHA_NOT_FOUND
        - RATE_LIMIT_EXCEEDED
        - NO_ACTIVE_CONNECTION
        - INVALID_SOURCE
        - ACTIVE_CONNECTION_EXISTS
        - DOMAIN_BLACKLISTED
        - NO_JOB_FOUND
        - DECK_NOT_FOUND
        - DECK_JOB_NOT_FOUND
        - JOB_DEFINITION_NOT_FOUND
        - FORBIDDEN
        - IDEMPOTENCY_KEY_INVALID
        - IDEMPOTENCY_KEY_DUPLICATE
        - CORRELATION_ID_INVALID
        - JOB_CANNOT_BE_CANCELED
        - JOB_NOT_RUNNING
        - NO_EVENT_FOUND
      type: string
  securitySchemes:
    client_id:
      type: apiKey
      description: Enter your client id
      name: x-deck-client-id
      in: header
    secret:
      type: apiKey
      description: Enter your secret
      name: x-deck-secret
      in: header

````