mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
# Changelog The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Changed - Update line length limit from 500 characters to 120 characters. ## Fixed - Most instances of these lint issues: 1. Lines longer than 120 characters ([MD013](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md)). 2. Trailing whitespaces ([MD009](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md)). 3. Ordered list item prefix ([MD029](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md)). 4. Bare links ([MD034](https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md)). Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org> Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/623 Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org> Co-authored-by: Javier Pérez <walpo@noreply.codeberg.org> Co-committed-by: Javier Pérez <walpo@noreply.codeberg.org>
48 lines
1.9 KiB
Markdown
48 lines
1.9 KiB
Markdown
---
|
|
eleventyNavigation:
|
|
key: AccessToken
|
|
title: Generating an Access Token
|
|
parent: AdvancedUsage
|
|
---
|
|
|
|
Access Tokens are special tokens that are used to authenticate to Codeberg through the [API](https://codeberg.org/api/swagger).
|
|
They can be used to give applications access to your Codeberg account without sharing your password.
|
|
|
|
{% admonition "info" %}
|
|
|
|
This guide explains how to generate an access token from the website.
|
|
However, you can also generate access tokens from the API.
|
|
Read more at [Forgejo's documentation](https://forgejo.org/docs/latest/user/api-usage/#generating-and-listing-api-tokens).
|
|
|
|
{% endadmonition %}
|
|
|
|
## Generating an Access Token
|
|
|
|
Access tokens grant full access to your account. You must handle them securely.
|
|
|
|
<img src="/images/advanced/access-token/generate-token.png" alt="">
|
|
|
|
1. In a web browser, go to Codeberg and click on the `Profiles and Settings` button on the top right.
|
|
The button will be your profile picture.
|
|
2. Click on [`Settings`](https://codeberg.org/user/settings) in the dropdown.
|
|
3. Navigate to the [`Applications`](https://codeberg.org/user/settings/applications) settings tab.
|
|
4. Under `Manage Access Tokens | Generate New Token`, enter a name to identify your token in the `Token Name` field.
|
|
5. Click the generate token button.
|
|
|
|
<img src="/images/advanced/access-token/token-generated.png" alt="">
|
|
|
|
Your access token has now been generated! Copy your token and store it securely.
|
|
|
|
{% admonition "tip" %}
|
|
|
|
Be sure to generate new access tokens for each app you use, and delete them once they are not in use.
|
|
|
|
{% endadmonition %}
|
|
|
|
## Deleting an Access Token
|
|
|
|
Once you are done using an access token, you should delete it.
|
|
Deleting an access token revokes access to your account for apps using the token.
|
|
|
|
To delete an access token, click the red `Delete` button next to the access token you want to delete,
|
|
then click `Yes` in the popup. Your access token is now deleted.
|