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

# Request new AccessToken

> # Description

Get access token for sign requests to the API

# Payload

```json
{
    "jwt": "string"
}

```

where:

*   `jwt`: JWT of the application
    

# Response

## 200:

```json
{
  "accessToken": "...."
}
```

## 401:

```json
{
  "message": "No active public Key is present with id"
}
```

## 404:

```json
{
  "message": "No active public Key is present with id :iss"
}
```

## 422:

```json
{
  "message": "Token has no valid format"
}
```

## 409:

```json
{
  "message": "Duplicated request, revoked permissions for existing token"
}
```

# Description

Get access token for sign requests to the API

# Payload

```json theme={null}
{
    "jwt": "string"
}

```

where:

* `jwt`: JWT of the application

# Response

## 200:

```json theme={null}
{
  "accessToken": "...."
}
```

## 401:

```json theme={null}
{
  "message": "No active public Key is present with id"
}
```

## 404:

```json theme={null}
{
  "message": "No active public Key is present with id :iss"
}
```

## 422:

```json theme={null}
{
  "message": "Token has no valid format"
}
```

## 409:

```json theme={null}
{
  "message": "Duplicated request, revoked permissions for existing token"
}
```


## OpenAPI

````yaml POST /v1/m2m-token
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /v1/m2m-token:
    post:
      summary: Request new AccessToken
      description: |-
        # Description

        Get access token for sign requests to the API

        # Payload

        ```json
        {
            "jwt": "string"
        }

        ```

        where:

        *   `jwt`: JWT of the application
            

        # Response

        ## 200:

        ```json
        {
          "accessToken": "...."
        }
        ```

        ## 401:

        ```json
        {
          "message": "No active public Key is present with id"
        }
        ```

        ## 404:

        ```json
        {
          "message": "No active public Key is present with id :iss"
        }
        ```

        ## 422:

        ```json
        {
          "message": "Token has no valid format"
        }
        ```

        ## 409:

        ```json
        {
          "message": "Duplicated request, revoked permissions for existing token"
        }
        ```
      operationId: request-new-accesstoken-post-v1-m2m-token
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              jwt: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://auth.admin.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````