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

# Authenticate and get token

> Returns a short-lived bearer token for use in API calls. The API key and API secret are **two distinct values** issued together: the key identifies your account, the secret authenticates the request.



## OpenAPI

````yaml /openapi.json get /v1/auth
openapi: 3.0.0
info:
  description: SuperDial REST API Reference
  version: 1.0.0
  title: SuperDial API
servers:
  - url: https://robodialer-service-api-9nc4t1p9.uc.gateway.dev
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      SuperDial employs Bearer Authentication. Fetch a bearer token using your
      API Key and API Secret, then pass it as `Authorization: Bearer <token>` on
      subsequent calls.
  - name: Requests
    description: >-
      Endpoints for creating and reading requests (structured data extraction
      jobs). All non-2xx responses use the uniform `{error, message, [details]}`
      envelope (see the `ApiError` schema).
  - name: Schemas
    description: >-
      Discover the schemas provisioned for your account and the required input
      keys for each. All non-2xx responses use the uniform `{error, message,
      [details]}` envelope (see the `ApiError` schema).
paths:
  /v1/auth:
    get:
      tags:
        - Authentication
      summary: Authenticate and get token
      description: >-
        Returns a short-lived bearer token for use in API calls. The API key and
        API secret are **two distinct values** issued together: the key
        identifies your account, the secret authenticates the request.
      responses:
        '200':
          description: Token returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthTokenResponse'
              example:
                token: eyJhbGciOiJSUzI1NiIs...truncated...signature
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
              examples:
                missingApiKey:
                  summary: Missing Robodialer-API-Key header
                  value:
                    error: MISSING_API_KEY
                missingApiSecret:
                  summary: Missing Robodialer-API-Secret header
                  value:
                    error: MISSING_API_SECRET
                invalidApiKey:
                  summary: API key not recognized
                  value:
                    error: INVALID_API_KEY
                unauthorized:
                  summary: Secret does not match the API key
                  value:
                    error: UNAUTHORIZED
      security:
        - apiKey: []
          apiSecret: []
      x-codeSamples:
        - lang: shell
          label: curl
          source: >-
            curl https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/auth
            \
              -H 'Robodialer-API-Key: <your-api-key>' \
              -H 'Robodialer-API-Secret: <your-api-secret>'
        - lang: python
          label: Python
          source: |-
            import requests

            r = requests.get(
                'https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/auth',
                headers={
                    'Robodialer-API-Key': '<your-api-key>',
                    'Robodialer-API-Secret': '<your-api-secret>',
                },
            )
            r.raise_for_status()
            token = r.json()['token']
        - lang: javascript
          label: JavaScript
          source: |-
            const r = await fetch(
              'https://robodialer-service-api-9nc4t1p9.uc.gateway.dev/v1/auth',
              {
                headers: {
                  'Robodialer-API-Key': '<your-api-key>',
                  'Robodialer-API-Secret': '<your-api-secret>',
                },
              },
            );
            const { token } = await r.json();
components:
  schemas:
    AuthTokenResponse:
      type: object
      description: >-
        Response from `GET /v1/auth`. Contains a short-lived bearer token usable
        as `Authorization: Bearer <token>` on subsequent calls.
      required:
        - token
      properties:
        token:
          type: string
          description: Short-lived bearer token (1-hour TTL).
      example:
        token: eyJhbGciOiJSUzI1NiIs...truncated...signature
    SimpleErrorResponse:
      type: object
      description: >-
        Standard error envelope. The `error` field is a human-readable message
        describing what went wrong; per-endpoint examples are listed under each
        response.
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Robodialer-API-Key
      description: Your SuperDial API key
    apiSecret:
      type: apiKey
      in: header
      name: Robodialer-API-Secret
      description: Your SuperDial API secret

````