---
title: "create OAuth account"
method: POST
path: "/w/{workspace}/oauth/create_account"
tags: ["oauth"]
---

# create OAuth account

`POST /w/{workspace}/oauth/create_account`

## Path parameters

- `workspace` string, required

## Request body

- object
  - `refresh_token` string, required — OAuth refresh token. For authorization_code flow, this contains the actual refresh token. For client_credentials flow, this must be set to an empty string.
  - `expires_in` integer, required
  - `client` string, required
  - `grant_type` string
  - `cc_client_id` string — OAuth client ID for resource-level credentials (client_credentials flow only)
  - `cc_client_secret` string — OAuth client secret for resource-level credentials (client_credentials flow only)
  - `cc_instance` string — Instance name for built-in providers whose client-credentials token URL is instance-templated; substituted into the fixed-host registry template server-side (client_credentials flow only). The token URL is never caller-supplied.
  - `cc_token_url` string — Bring-your-own token endpoint override (client_credentials flow only). Only honored together with cc_client_id/cc_client_secret and mutually exclusive with cc_instance; ignored/rejected on the shared-instance path.
  - `mcp_server_url` string — MCP server URL for MCP OAuth token refresh
  - `scopes` string[] — OAuth scopes to use for token refresh. Overrides instance-level scopes.

## Response `200`

account set

---

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