Skip to content
getgeolens.com

Update Oauth Provider

PUT
/settings/oauth-providers/{provider_id}
curl --request PUT \
--url https://example.com/api/settings/oauth-providers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "slug": "example", "display_name": "example", "provider_type": "google", "client_id": "example", "client_secret": "example", "discovery_url": "example", "authorize_url": "example", "token_url": "example", "userinfo_url": "example", "scopes": "example", "default_role": "example", "group_claim": "example", "group_role_mapping": {}, "enabled": true }'

Update an existing OAuth provider (admin only).

provider_id
required
Provider Id
string format: uuid
Media type application/json
OAuthProviderUpdate

Schema for updating an existing OAuth provider. All fields optional.

object
slug
Any of:
string
>= 1 characters <= 50 characters /^[a-z0-9-]+$/
display_name
Any of:
string
>= 1 characters <= 100 characters
provider_type
Any of:
string
Allowed values: google microsoft oidc
client_id
Any of:
string
>= 1 characters <= 500 characters
client_secret
Any of:
string
>= 1 characters <= 1000 characters
discovery_url
Any of:
string
<= 512 characters
authorize_url
Any of:
string
<= 512 characters
token_url
Any of:
string
<= 512 characters
userinfo_url
Any of:
string
<= 512 characters
scopes
Any of:
string
<= 500 characters
default_role
Any of:
string
<= 50 characters
group_claim
Any of:
string
<= 100 characters
group_role_mapping
Any of:
object
key
additional properties
any
enabled
Any of:
boolean

Successful Response

Media type application/json
OAuthProviderResponse

Response schema for OAuth provider. Never exposes client_secret.

object
id
required
Id

Unique provider identifier.

string format: uuid
slug
required
Slug

URL-safe identifier used in the callback URL.

string
display_name
required
Display Name

Label shown on the login page button.

string
provider_type
required
Provider Type

Provider type: ‘google’, ‘microsoft’, or ‘oidc’.

string
client_id
required
Client Id

OAuth client ID. Visible to admins; never exposes client_secret.

string
discovery_url
Any of:
string
authorize_url
Any of:
string
token_url
Any of:
string
userinfo_url
Any of:
string
scopes
required
Scopes

Space-separated OAuth scopes.

string
default_role
required
Default Role

Default role assigned to new users.

string
group_claim
Any of:
string
group_role_mapping
Any of:
object
key
additional properties
any
enabled
required
Enabled

Whether the provider button appears on the login page.

boolean
created_at
required
Created At

Timestamp the provider was created.

string format: date-time
updated_at
required
Updated At

Timestamp the provider was last updated.

string format: date-time
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"slug": "example",
"display_name": "example",
"provider_type": "example",
"client_id": "example",
"discovery_url": "example",
"authorize_url": "example",
"token_url": "example",
"userinfo_url": "example",
"scopes": "example",
"default_role": "example",
"group_claim": "example",
"group_role_mapping": {},
"enabled": true,
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}