# requestToken

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /json-rpc/authorize/token/approve:
    post:
      summary: requestToken
      deprecated: false
      description: ''
      tags:
        - Hyperion API/Authorization
        - Websocket
        - HTTP/S
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                command:
                  type: string
                  enum:
                    - authorize
                  description: >-
                    Main instruction field. For authentication, always set to
                    'authorize'.
                subcommand:
                  type: string
                  enum:
                    - requestToken
                  examples:
                    - requestToken
                  x-apidog-enum:
                    - value: requestToken
                      name: ''
                      description: ''
                  description: >-
                    Defines the specific authorization action, such as login,
                    logout, etc.
                comment:
                  type: string
                  minLength: 5
                  description: >-
                    Optional text (min 5 characters) to identify or annotate the
                    token.
                id:
                  type: string
                  minLength: 5
                  maxLength: 5
                  description: Unique identifier for a token (usually 5 characters).
                accept:
                  type: boolean
                  default: true
                  description: Boolean to accept or deny a token request.
                tan:
                  type: integer
                  minimum: 0
                  examples:
                    - 4711
                  description: Transaction number for tracking requests and responses.
              x-apidog-orders:
                - command
                - subcommand
                - comment
                - id
                - accept
                - 01JSSVXF50TJ6CZ1QPS8TQDWXN
              required:
                - command
                - subcommand
                - comment
                - id
                - accept
              x-apidog-refs:
                01JSSVXF50TJ6CZ1QPS8TQDWXN:
                  $ref: '#/components/schemas/tan'
              type: object
              x-apidog-ignore-properties:
                - tan
            example:
              command: authorize
              subcommand: requestToken
              comment: OpenHab2 Binding
              id: WD6nT
              accept: true
              tan: 4711
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/response'
              examples:
                '1':
                  summary: Success
                  value:
                    command: authorize-requestToken
                    info:
                      comment: OpenHab2 Binding
                      id: WD6nT
                      token: 83675c61-141e-460c-8a92-c4da55b61e0d
                    success: true
                    tan: 4711
                '2':
                  summary: Exception
                  value:
                    command: authorize-requestToken
                    error: Token request timeout or denied
                    success: false
                    tan: 4711
          headers: {}
          x-apidog-name: Success
      security:
        - bearer: []
      x-apidog-folder: Hyperion API/Authorization
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/894413/apis/api-16311741-run
components:
  schemas:
    tan:
      type: object
      properties:
        tan:
          type: integer
          minimum: 0
          examples:
            - 4711
          description: Transaction number for tracking requests and responses.
      x-apidog-orders:
        - tan
      title: tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    response:
      type: object
      properties:
        command:
          type: string
          description: The command executed
        subcommand:
          type: string
          description: The sub-command executed
        success:
          type: boolean
          description: Result, if the request excuted successfully
        info:
          type: object
          properties: {}
          x-apidog-orders: []
          description: Information requested
          additionalProperties: true
          x-apidog-ignore-properties: []
        error:
          type: string
          description: Reason why a request did not execute successfully
        errorData:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
            x-apidog-orders:
              - description
            x-apidog-ignore-properties: []
          description: Detailed error explaination
        tan:
          type: integer
          description: Request's transaction number
      required:
        - command
        - success
        - tan
      x-apidog-orders:
        - command
        - subcommand
        - success
        - info
        - error
        - errorData
        - tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: http://{{host}}:8090
    description: Develop Env
  - url: https://{{host}}:8092
    description: Testing Env
security: []

```
