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

# Generate Card Token

> This endpoint generates a card token to be used for displaying sensitive card data.



## OpenAPI

````yaml openapi.json get /cards/{id}/token
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /cards/{id}/token:
    get:
      summary: Generate Card Token
      description: >-
        This endpoint generates a card token to be used for displaying sensitive
        card data.
      operationId: generate-card-token
      parameters:
        - name: id
          in: path
          description: The `_id` of the card to generate the token for.
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "statusCode": 200,
                        "message": "Card token generated successfully.",
                        "data": {
                            "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NDE4ZWI3MWEzN2U0MDUwNjQ2OTQ1MTgiLCJ0eXBlIjoiQ0FSRFRPS0VOIiwiaWF0IjoxNzA3NzE4ODk2LCJleHAiOjE3MDc3MTkwMTZ9.Cj-Q21HKgUCOFvC3l7JQc0OZdoW932TEeeAFK6GEOGQ"
                        }
                    }
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 200
                    default: 0
                  message:
                    type: string
                    example: Card token generated successfully.
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        example: >-
                          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NDE4ZWI3MWEzN2U0MDUwNjQ2OTQ1MTgiLCJ0eXBlIjoiQ0FSRFRPS0VOIiwiaWF0IjoxNzA3NzE4ODk2LCJleHAiOjE3MDc3MTkwMTZ9.Cj-Q21HKgUCOFvC3l7JQc0OZdoW932TEeeAFK6GEOGQ
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````