---
title: "Create New Service Token"
method: POST
path: "/token"
tags: ["service_token"]
---

# Create New Service Token

`POST /token`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/token`
- Auth: HTTP bearer

## Response `201`

Service Token created

- CreateServiceTokenResp
  - `access_token` string, required: The JWT access token
  - `expires_in` integer: The duration in seconds the access token is valid for
  - `refresh_token` string, required: The JWT refresh token
  - `refresh_expires_in` integer: The duration in seconds the refresh token is valid for
  - `token_type` string: Bearer
  - `not-before-policy` integer: Timestamp that indicates the time before which the JWT must not be accepted for processing
  - `session_state` string: Session id, identifier that uniquely ties the session to the authenticated user
  - `scope` string: Claim in a JWT defines the set of permissions or access rights granted

## Other responses

- `422`: Validation Error
- `500`: Internal Server Error

## Changes

> 17 revisions in range; 4 not diffed.

- **2025-02-10** `5d2a37e74bec`: 1 info
  - the endpoint scheme security `SciCatAuth` was added to the API

[Operation history](https://skmtc.dev/swissopenem/apis/ethz-archiver-service/changes/token/post.md)

---

[API](https://skmtc.dev/swissopenem/apis/ethz-archiver-service.md) - [All operations](https://skmtc.dev/swissopenem/apis/ethz-archiver-service/llms.txt) - [OpenAPI document](https://skmtc.dev/swissopenem/apis/ethz-archiver-service/revisions/527aef2c43cd?raw)
