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

# Get Tokens

> Get FCM Token by User ID



## OpenAPI

````yaml GET /tokens
openapi: 3.0.0
info:
  title: Token Management API
  version: 1.0.0
  description: API for managing FCM tokens and sending push notifications.
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /tokens:
    get:
      description: Get FCM Token by User ID
      parameters:
        - name: userId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: FCM token retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    userId:
                      type: integer
                    fcmToken:
                      type: string
        '400':
          description: Bad Request - userId is required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: FCM token not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Internal Server Error - Error fetching token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string

````