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

# Get Token



## OpenAPI

````yaml post /oauth/token
openapi: 3.0.0
info:
  version: 1.0.0
  title: Sohar API
  license:
    name: MIT
servers:
  - url: https://api.soharhealth.com
security: []
paths:
  /oauth/token:
    post:
      tags:
        - Auth
      summary: Get Token
      operationId: getToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - client_id
                - client_secret
              type: object
              properties:
                client_id:
                  type: string
                  description: Your application's Client ID
                client_secret:
                  type: string
                  description: Your application's Client Secret
            example:
              client_id: YOUR_CLIENT_ID
              client_secret: YOUR_CLIENT_SECRET
      responses:
        '200':
          description: Access token
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb2hhciI6ImhlYWx0aCJ9.0sXbystKB9fXid-8ESps2JnaFRFPmLFOc8n6jnCDih4
                  token_type:
                    type: string
                    enum:
                      - Bearer
                    example: Bearer
                  expires_in:
                    type: number
                    description: Time in seconds
                    example: 3600
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_request_error
                    default: invalid_request_error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - invalid_request_error
                    default: invalid_request_error
        '500':
          description: Internal error

````