Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of 1.24.7, which is no longer the latest release. See the latest release.

update an OAuth2 Application, this includes regenerating the client secret

PATCH
/user/applications/oauth2/{id}
curl --request PATCH \
--url https://gitea.com/api/v1/user/applications/oauth2/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "confidential_client": true, "name": "example", "redirect_uris": [ "example" ], "skip_secondary_authorization": true }'
id
required
integer format: int64

Application to be updated

CreateOAuth2ApplicationOptions holds options to create an oauth2 application

object
confidential_client
boolean
name
string
redirect_uris
Array<string>
skip_secondary_authorization
boolean
Examplegenerated
{
"confidential_client": true,
"name": "example",
"redirect_uris": [
"example"
],
"skip_secondary_authorization": true
}

OAuth2Application

Media typeapplication/json
OAuth2Application represents an OAuth2 application.
object
client_id
string
client_secret
string
confidential_client
boolean
created
string format: date-time
id
integer format: int64
name
string
redirect_uris
Array<string>
skip_secondary_authorization
boolean
Examplegenerated
{
"client_id": "example",
"client_secret": "example",
"confidential_client": true,
"created": "2026-04-15T12:00:00Z",
"id": 1,
"name": "example",
"redirect_uris": [
"example"
],
"skip_secondary_authorization": true
}

APINotFound is a not found empty response

Media typeapplication/json