---
title: "Create a persistent access token"
method: POST
path: "/services/gear/AuthorizationService.svc/CreateClientAccessTokenAllIntegrations"
tags: ["Access tokens"]
---

# Create a persistent access token

`POST /services/gear/AuthorizationService.svc/CreateClientAccessTokenAllIntegrations`

## Request

- Base URL: `https://gear.cloud.studio`
- URL: `https://gear.cloud.studio/services/gear/AuthorizationService.svc/CreateClientAccessTokenAllIntegrations`
- Auth: none required

Creates an access token that inherits the permissions of the user whose
credentials are sent. Without `expiration` the token expires on
2099-01-01.

Two requests with the same `Description` fail. After three consecutive
requests with wrong credentials the API answers "Please complete the
captcha" until that user signs in to the platform and solves it.

## Request body

- CreateAccessTokenRequest
  - `clientAccessToken` object, required
    - `Description` string, required: What the token is for. Must be unique.
    - `ClientID` integer, required: Client the token is created for.
  - `login` object, required
    - `LoginType` 1, required
    - `Email` string, email, required
    - `Password` string, password, required
  - `expiration` integer: Minutes the token stays valid from its creation. Omit it for a token that expires on 2099-01-01.

## Response `200`

The token was created.

- object
  - `CreateClientAccessTokenAllIntegrationsResult` ClientAccessToken
    - `AccessToken` string
    - `ClientAccessTokenID` integer
    - `ClientID` integer
    - `Description` string
    - `DateTimeCreated` DateTimeParts
      - `Date` object
        - `Day` integer
        - `Month` integer
        - `Year` integer
      - `Time` object
        - `Hour` integer
        - `Minute` integer
        - `Second` integer
        - `Millisecond` integer
    - `ExpirationDateTime` DateTimeParts
      - `Date` object
        - `Day` integer
        - `Month` integer
        - `Year` integer
      - `Time` object
        - `Hour` integer
        - `Minute` integer
        - `Second` integer
        - `Millisecond` integer

## Other responses

- `500`: The request failed. A missing, invalid or expired access token is also reported this way.

---

[API](https://skmtc.dev/cloudstudioiot/apis/cloud-studio-iot-data-extraction-api.md) · [All operations](https://skmtc.dev/cloudstudioiot/apis/cloud-studio-iot-data-extraction-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudstudioiot/apis/cloud-studio-iot-data-extraction-api/revisions/1f497bcfbbb1?raw)
