---
title: "Get access token"
method: POST
path: "/auth/token"
tags: ["auth"]
---

# Get access token

`POST /auth/token`

This endpoint allows user to receive access token that can be used to access luma service with. This is similar to login flow except that client receives access token by providing clientId and clientSecret.

## Request body

- object
  - `client_id` string, required — client_id provided by luma
  - `client_secret` string, required — client_secret provided by luma
  - `grant_type` 'client_credentials', required — The type of token to generate

## Response `200`

Returns a JWT token that can be used as a Bearer token.

- object
  - `access_token` string, required
  - `token_type` 'Bearer', required
  - `expires_in` number, required

## Other responses

- `400` — A 400 will be returned if any of the request parameters (client_id or client_secret) is malformed/invalid or missing.
- `401` — A 401 Unauthorized will be returned if wrong clientId and/or clientSecret is given.

---

[API](https://skmtc.net/lumahealth/apis/rest-service.md) · [All operations](https://skmtc.net/lumahealth/apis/rest-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lumahealth/rest-service/revisions/d3c75c2a2f1d/schema)
