Create an access token
curl --request POST \
--url https://gogs.example.com/api/v1/users/{username}/tokens \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"name": "<string>",
"sha1": "<string>"
}Users
Create an access token
Requires basic authentication.
POST
/
users
/
{username}
/
tokens
Create an access token
curl --request POST \
--url https://gogs.example.com/api/v1/users/{username}/tokens \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"name": "<string>",
"sha1": "<string>"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Username
Body
application/json