---
title: "Generate stClientId and stClientSecret"
method: POST
path: "/schema/oauth/stclient/credentials"
tags: ["OAuth"]
---

# Generate stClientId and stClientSecret

`POST /schema/oauth/stclient/credentials`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/schema/oauth/stclient/credentials`
- Auth: none declared. Required headers: `Authorization`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/schema/oauth/stclient/credentials/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate new `stClientId` and `stClientSecret` for a SmartThings Schema App.

## Headers

- `Authorization` string, Bearer token, required
- `X-ST-Organization` string, organizationId

## Request body

- GenerateStOauthBody
  - `endpointAppId` string: SmartThings Schema App id for the partner

## Response `200`

Success

- PostReceipt
  - `endpointAppId` string, uuid
  - `stClientId` string, uuid
  - `stClientSecret` string, uuid

## Other responses

- `400`: BadRequest
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: InternalServiceError

## Changes

- **2025-05-16** `b04d2dce35dd`: 1 info
  - added the new optional `header` request parameter `X-ST-Organization`
- **2022-12-19** `adcacfc2749d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/schema/oauth/stclient/credentials/post.md)

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
