How to register your own GitHub App
Register a GitHub App and obtain credentials to connect it to Tenklo
This guide shows you how to register your own GitHub App to obtain your OAuth credentials (App ID and Private Key). These are required to let your users grant your app access to their GitHub account.
If you don't already have one, sign up for a GitHub account.
Configure basic app information
- Under GitHub App name, enter a name for your app. Choose a clear and short name (maximum 34 characters).
- Optionally, under Description, type a description of your app. Users will see this when installing your app.
- Under Homepage URL, type the full URL to your app's website. If you don't have a dedicated URL, you can use your GitHub repository URL or organization URL.
If your app needs to act on behalf of a user (generate a user access token):
- Under Callback URL, enter
https://api.tenklo.dev/oauth/callback. - You can add up to 10 callback URLs by clicking Add callback URL.
This field is required if you plan to select Request user authorization (OAuth) during installation in the next step, because that flow completes through the callback URL. It can be left blank otherwise.
Configure user authorization settings
- By default, Expire user authorization tokens is selected. GitHub recommends keeping this option enabled.
- If you want users to authorize your app when they install it, select Request user authorization (OAuth) during installation.
- If you want to use device flow to generate a user access token, select Enable Device Flow.
Item 2 decides which Tenklo integration you set up, and the next step depends on it. Leave it unselected for GitHub (App). Select it for GitHub (App OAuth), which authorizes the user and installs the app in one flow.
What you do here depends on the previous step.
If you left Request user authorization (OAuth) during installation unselected, under Setup URL enter https://api.tenklo.dev/app-auth/connect. If you use a custom callback URL, take that URL and replace oauth/callback with app-auth/connect. Tenklo also shows the exact value on the integration page once you create it.
If you selected Request user authorization (OAuth) during installation, GitHub disables the Setup URL field. There is nothing to enter, the connection completes through the callback URL and the installation webhook instead. Keep going with this guide, the remaining steps apply to both flows.
In both cases, select Redirect on update under Post installation.
When the setup URL field is available, it is what completes the connection. GitHub sends the installation ID there after an install, and without it the app installs on GitHub but no connection appears in Tenklo.
Leave webhooks off for now. The webhook URL and secret both come from your Tenklo integration, and that integration needs the App ID and private key you generate later in this guide.
- Clear the Active checkbox. GitHub requires a webhook URL while Active is selected.
- Under SSL verification, keep Enable SSL verification selected (recommended).
You turn webhooks on in the last step, once Tenklo can show you both values.
- Under Permissions, choose the permissions your app needs. For each permission, select the dropdown menu and click Read-only, Read & write, or No access.
- Select the minimum permissions necessary for your app's functionality.
- Common permissions include:
- Repository: Access to repositories
- Issues: Access to issues
- Pull requests: Access to pull requests
- Workflows: Access to GitHub Actions workflows
- Organization: Access to organization settings
Note: The permissions you select will determine what webhook events are available.
Under Where can this GitHub App be installed?, select:
- Only on this account - For apps that only you or your organization will use
- Any account - For apps that will be installed by other GitHub users or organizations
Click Create GitHub App to complete the registration process.
After creating your GitHub App:
- On your GitHub App's settings page, scroll down to the Private keys section.
- Click Generate a private key.
- A private key file will be downloaded to your computer. Store this file securely as GitHub will not store a copy.
- This private key will be needed when configuring your integration in Tenklo.
Note your App ID and installation URL
- On your GitHub App's settings page, note the App ID at the top of the page.
- Also note your App Public Link (e.g., https://github.com/apps/your-app-name).
- You'll need both of these when configuring your integration in Tenklo.
Set up the integration in Tenklo
Create the integration in Tenklo and fill in the App ID, App Private Key and App Public Link you just collected. Use GitHub (App) if you left user authorization during installation unselected, and GitHub (App OAuth) if you selected it.
GitHub (App OAuth) also needs the client ID and client secret. See GitHub App OAuth setup for those.
Saving these lets Tenklo derive the webhook secret, which it cannot do before the integration exists.
Enable webhooks on your GitHub App
On your Tenklo integration page, copy the value under Webhook URL and the value under Webhook Secret. Then go back to your GitHub App settings:
-
Select the Active checkbox under Webhooks.
-
Under Webhook URL, paste the webhook URL from Tenklo.
-
Under Webhook secret, paste the webhook secret from Tenklo. This is required. GitHub only signs payloads when the secret is set, and Tenklo verifies every payload it receives. Keep it secure and never expose it publicly.
-
Under Subscribe to events, select the events you want your app to receive, such as Push, Pull request, Issues or Repository.
-
Save the changes.
Tenklo rejects a webhook that arrives with no x-hub-signature-256 header, and it is not forwarded to your app. An app set up without the webhook secret looks correctly configured on GitHub but delivers nothing.
Follow the Quickstart.
Add the webhook secret to an existing GitHub App
If your GitHub App sends webhooks to Tenklo without a webhook secret, GitHub does not sign the payloads and Tenklo cannot verify them. Add the secret to start sending signed payloads. This applies to both GitHub (App) and GitHub (App OAuth) integrations.
The secret is set once on the GitHub App and covers every installation. Your existing connections keep working, and your users don't need to reinstall or reauthorize anything.
-
On your Tenklo integration page, copy the value under Webhook Secret.
-
In your GitHub App settings, under Webhook, paste it into Secret and click Save changes.
-
To confirm, open the Advanced tab of your GitHub App settings. New entries under Recent Deliveries should include an
X-Hub-Signature-256header and a200response from Tenklo.
Tenklo derives the webhook secret from the App ID, App Private Key and App Public Link. If you change any of them in Tenklo, copy the new Webhook Secret to your GitHub App again.
Important considerations
- There are certain API methods that only work with an OAuth App that will not work with a GitHub App. Please check the Github documentation and look for a "Works with Github Apps" header under the endpoint.
- Tenklo supports initiating a connection with a GitHub App using the frontend SDK, but not directly from the GitHub Marketplace. Therefore, you should encourage users to install your GitHub App from your product, rather than from the GitHub Marketplace directly. This is a limitation we plan to fix in the future.
- GitHub Apps can use both REST and GraphQL APIs, but the available endpoints depend on the permissions configured for the app.
- When making API requests with a GitHub App, you need to authenticate as the app installation, not as the app itself.
- Rate limits for GitHub Apps are higher than for OAuth Apps and are based on the installation, not the user.
For more details on GitHub Apps, see GitHub's documentation.