Connect to GitHub
Learn how to connect GitHub to Retool.
You can connect to GitHub and make it available as a resource in Retool. Once complete, your users can write queries that interact with GitHub data using GraphQL.
To use GitHub as a source control provider to manage your apps, resources, and workflows, go to the Source Control documentation instead.
All users for Retool organizations on Free or Team plans have global Edit permissions and can add, edit, and remove resources. If your organization manages user permissions for resources, you must be a member of a group with Edit all permissions.
1. Create a new resource
Sign in to your Retool organization and navigate to the Resources tab. Click Create new, then select Resource.
2. Select the resource type
Retool can connect to almost any API or database, and has built-in integrations for popular data sources. Select the GitHub resource type.
3. Configure the resource
Specify a name and location for the GitHub resource. Retool displays the resource name and type in query editors to help users identify them.
Next, configure the authentication settings. Click Continue with Personal Token or Continue with OAuth to toggle between personal access tokens and OAuth authentication.
Personal access token
To use a personal access token for authentication, enter the following settings.
|GitHub username||The GitHub username for the uesr who created the token.|
|GitHub personal token||The GitHub personal access token.|
To use OAuth for authentication, first create a new OAuth app in Github by visiting the Developer Settings page within your account Settings. Copy the OAuth callback URL in the Retool resource page and use it as the Authorization callback URL in GitHub.
In the settings section of your GitHub app, copy the Client ID and Client Secret keys and enter them in the Retool resource settings. Select the permissions you'd like to authorize to the Scopes dropdown.
Click Test Connection to verify that Retool can connect to GitHub. If the test fails, check the resource settings and try again. Testing a connection only checks whether Retool can successfully connect to the resource. It cannot check whether the provided credentials have sufficient privileges or can perform every supported action.
4. Save the resource
Click Create resource to complete the setup. You can then click either Create app to immediately start building a Retool app or Back to resources to return to the list of resources.
Your GitHub resource is now ready to use. To interact with GitHub data, select the resource in the query editor.
Updated 23 days ago