---
title: "Upsert OAuth provider credentials"
method: PUT
path: "/api/auth/settings/oauth/{provider}"
tags: ["Auth - Settings"]
---

# Upsert OAuth provider credentials

`PUT /api/auth/settings/oauth/{provider}`

## Request

- Base URL: `https://api.ascendkit.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ascendkit.dev/api/auth/settings/oauth/{provider}`
- Auth: API key in header `X-AscendKit-Public-Key` and HTTP bearer

Stores or updates OAuth credentials for a provider and returns the derived callback URL the developer should register with that provider.

## Path parameters

- `provider` string, required

## Request body

- OAuthConfigUpdate
  - `clientId` string, required: OAuth client ID issued by the provider.
  - `clientSecret` string, required: OAuth client secret issued by the provider.
  - `callbackUrl` string, nullable: Optional absolute callback override. Leave empty to use the derived redirect URI for the active OAuth flow.

## Response `200`

Successful Response

- ApiResponse
  - `data` unknown
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ascendkit/apis/ascendkit-api.md) · [All operations](https://skmtc.dev/ascendkit/apis/ascendkit-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ascendkit/apis/ascendkit-api/revisions/0a41c122c44f?raw)
