> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/get-started/onboarding-to-ox/source-control/github/github-token/getting-github-tokens.md).

# Getting GitHub Tokens

When integrating with [GitHub](https://docs.ox.security/get-started/onboarding-to-ox/source-control/github.md) source control and [GitHub Issues](https://docs.ox.security/ticketing-and-messaging/ticket-management/github-issues.md), you need to get GitHub tokens.

**To get GitHub tokens:**

1. Log in to your GitHub account.
2. From your profile picture in the top-right corner select **Settings**, then scroll down and select **Developer settings**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-a807fe88c9396bae32f9688dff0c800992c90859%2FGH_dev_settings.png?alt=media&amp;token=26404a02-8ca5-4acd-b5b8-2780d224cab7" alt="" width="563"><figcaption></figcaption></figure>

3. In the **Developer settings** page, select **Personal access tokens > Tokens (classic)** and define the parameters as follows.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-a865e15a9f992ab931e340401f993e88e484515d%2FGH_Token_scopes.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

| Parameter         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Name**          | A significant name that makes it easy to identify the purpose of the token.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Expiration**    | Set the expiration date as far as possible.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Select scopes** | <p>By selecting scopes you define the access permissions.<br></p><p>For GitHub source control - OX integration, select the following scopes:</p><ul><li>repo</li><li>read:packages</li><li>read:org</li><li>read:repo\_hook</li><li>read:user</li><li>user:email</li><li>read:audit\_log</li></ul><p>For GitHub Issues - OX integration, select the following scopes:</p><ul><li>repo</li><li>project</li><li>read:user</li><li>read:org</li></ul><blockquote><p><strong>Note:</strong> The Organization field in the GitHub Issues ticket window requires a classic personal access token with the <code>read:org</code> scope. Fine-grained personal access tokens are not supported for retrieving the organization list, so the Organization field remains empty when a fine-grained token is used.</p></blockquote> |

4. Select **Update token**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-17853548cd91ca96cdc3b4e7ce70536b004a36c1%2FGH_taken.png?alt=media&amp;token=e6eebe42-2ef6-481c-b69d-2404782ca770" alt=""><figcaption></figcaption></figure>

5. Copy the token and store it in a different location.\
   After closing this dialog you cannot see it again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ox.security/get-started/onboarding-to-ox/source-control/github/github-token/getting-github-tokens.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
