# GitHub

{% hint style="success" %}
If you need to add GitHub source control, please refer to [this page](https://docs.uibakery.io/on-premise/git-source-control).
{% endhint %}

## Configuration

To connect your GitHub, follow the instruction below:

1. On the **Data sources** page, click **Connect**, and select *GitHub* in the Data sources list.
2. Next, select the authentication method - [OAuth2](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps) or [Personal Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
   1. For **OAuth2**, you will first need to create a new OAuth app in GitHub (*Settings* > *Developer Settings*).

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FyAIE8E7OJlrgOA2roZpJ%2FCleanShot%202025-04-16%20at%2011.54.57%402x-min.png?alt=media&#x26;token=434f4fee-a08f-4b72-8ffa-0ae65f33bce5" alt=""><figcaption></figcaption></figure>

Copy the **UI Bakery redirect callback** from the Data source connection page and use it as the **Authorization callback URL** when creating an OAuth app.

Once you've registered the app, go back to UI Bakery - specify your **Client ID** and **Client secret** and define the required permissions in the *Scopes* field. Finally, click **Connect to API** to complete the setup. You will be redirected to the GitHub authorization screen to allow the UI Bakery app.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2F67aGqwHEkBAqjQGZY2w3%2FCleanShot%202025-04-16%20at%2012.38.47%402x-min.png?alt=media&#x26;token=3ce72054-462b-4aab-b85f-583bb47f58e5" alt=""><figcaption></figcaption></figure>

&#x20;     b. For **Personal Token**, you need to specify your personal GitHub token.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FAkxS7NA5B3l9Pmae81Zx%2FCleanShot%202025-04-16%20at%2012.44.39%402x-min.png?alt=media&#x26;token=09e4951d-44a2-4229-8b54-17031c296476" alt=""><figcaption></figcaption></figure>

3. Click **Test connection** to check whether the data source can be connected, and then click **Connect Datasource** to complete the setup.

## **Usage**

Once you have connected GitHub to UI Bakery, you can start interacting with your data. For this purpose you can use the [Open API request](https://docs.uibakery.io/reference/working-with-actions/open-api-request) action step:

1. Create a new action, select your *GitHub data source* and the *Open API request* action will be selected automatically.\
   All available GitHub endpoints will be defined.
2. Select the required endpoint from the **Operation** dropdown. Set any additional parameters and/or body if necessary.
3. Execute your action.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2Fv0ETXhIvvZLw35wHS5el%2FCleanShot%202025-04-16%20at%2013.06.36%402x-min.png?alt=media&#x26;token=10972a20-0eef-4d0c-a3ae-c380404e5fdf" alt=""><figcaption></figcaption></figure>
