This topic was automatically generated from Slack. You can find the original thread here.
I am trying to use Github App not Github OAuth. How to do?
This topic was automatically generated from Slack. You can find the original thread here.
I am trying to use Github App not Github OAuth. How to do?
To use a GitHub App (not GitHub OAuth) with Pipedream, you currently cannot use the built-in GitHub OAuth app connection, since it is designed for personal OAuth tokens, not GitHub App authentication (which uses JWTs and installation tokens). Here’s how you can use a GitHub App with Pipedream: ### 1. Generate GitHub App tokens manually You’ll need to authenticate as a GitHub App by generating a JWT (using your app’s private key), then exchange that for an installation access token. This process is not handled by Pipedream’s built-in GitHub app, so you’ll need to do it in a code step. #### Example: Authenticate as a GitHub App in a Pipedream Node.js code step import jwt from "jsonwebtoken"; import { axios } from "@pipedream/platform"; export default defineComponent({ props: { appId: { type: "string", label: "GitHub App ID", }, installationId: { type: "string", label: "Installation ID", }, privateKey: { type: "string", label: "GitHub App Private Key (PEM format)", description: "Paste your private key here, including the BEGIN/END lines.", secret: true, }, }, async run({ steps, $ }) { // 1. Create a JWT const now = Math.floor(Date.now() / 1000); const payload = { iat: now - 60, exp: now + (10 ** 60), iss: this.appId, }; const jwtToken = jwt.sign(payload, this.privateKey, { algorithm: "RS256" }); // 2. Exchange JWT for an installation access token const { token } = await axios($, { method: "POST", url: `https://api.github.com/app/installations/${this.installationId}/access_tokens`, headers: { Authorization: `Bearer ${jwtToken}`, Accept: "application/vnd.github+json", }, }); // 3. Use the installation token to make GitHub API requests const repos = await axios($, { url: "https://api.github.com/installation/repositories", headers: { Authorization: `token ${token}`, Accept: "application/vnd.github+json", }, }); return repos; }, }); You’ll need: - Your GitHub App’s App ID - The installation ID (you can get this from the GitHub UI or API) - The private key for your GitHub App (in PEM format) ### 2. Use the installation token for API requests Once you have the installation token, use it in the Authorization header as token <installation_token> for any GitHub API requests. — *Summary: Pipedream’s built-in GitHub app uses OAuth, not GitHub App authentication. To use a GitHub App, handle authentication manually in a code step as shown above. If you’d like to see native support for GitHub App authentication in Pipedream, you can submit a request at New Pipedream Integration Request. Let me know if you need help with the code or have questions about this process!
You don’t support Github App? Y/n?
You support Github OAuth? Y/n?
At this time, Pipedream’s built-in GitHub integration only supports connecting via GitHub OAuth (personal or organization user authentication), not via GitHub App authentication (JWT + installation token flow). There is no native, no-code support for authenticating as a GitHub App in the UI. Summary: - GitHub OAuth: Supported natively in Pipedream (connect your GitHub user account). - GitHub App authentication: Not natively supported. You cannot connect a GitHub App directly via the Pipedream UI. Workaround: You can still use a GitHub App by manually handling the JWT and installation token exchange in a custom code step. This requires writing custom Node.js code to generate a JWT, exchange it for an installation token, and make API requests. If you’d like to see native GitHub App support in Pipedream, please submit a request at New Pipedream Integration Request. If you have more questions or need help, please visit Pipedream.
Yes, Pipedream supports GitHub OAuth. You can connect your GitHub account to Pipedream using OAuth to authorize requests to the GitHub API. This is the standard method for authenticating with GitHub on Pipedream and is used by all pre-built GitHub components and actions. If you need more details or want to use your own OAuth client, you can read more about it in the Pipedream GitHub integration docs. If you have any other questions or need help, please let me know!