---
title: "Generate client id and secret"
method: POST
path: "/auth/clients"
tags: ["auth"]
---

# Generate client id and secret

`POST /auth/clients`

This endpoint allows our users to generate clientId and clientSecrets that can be used  for machine-to-machine communication without the need of a username / password. Since  clientId / clientSecret never expires, it is usefull in running automation process / scripts etc. A user can only have one clientId/clientSecret at any given time.

## Request body

- object
  - `clientName` string, required — Name of the client

## Response `200`

Returns a clientId and clientSecret

- object
  - `clientId` string, required
  - `clientSecret` string, required

## Other responses

- `400` — If the request parameter - clientName - is malformed/invalid or missing. We will also return 400 if the operation fails.
- `406` — If a clientId/clientSecret pair has already been generated.

---

[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)
