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

# Create New Service Token

`POST /token`

## 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

---

[API](https://skmtc.net/swissopenem/apis/ethz-archiver-service-2.md) · [All operations](https://skmtc.net/swissopenem/apis/ethz-archiver-service-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/swissopenem/ethz-archiver-service-2/versions/2d7175dce3c0/schema)
