Approve the pending request of a fine-grained access token
POST
/orgs/{org}/personal-access-tokens/{id}/approve
const url = 'https://gitea.example.com/api/v1/orgs/example/personal-access-tokens/1/approve';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"comment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.example.com/api/v1/orgs/example/personal-access-tokens/1/approve \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "comment": "example" }'Gitea Enterprise only. This endpoint is not part of the community edition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Name of the organization
id
required
integer format: int64
Id of the token
Request Body
Section titled “Request Body”Media typeapplication/json
OrgAccessTokenReviewOption is the decision on a token.
object
comment
A note for the holder
string
Examplegenerated
{ "comment": "example"}Responses
Section titled “Responses”APIEmpty is an empty response
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
APIError is error format response
Headers
Section titled “Headers”message
string
url
string