Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to retrieve an org's GitHub App Installation #206

Open
Mariatta opened this issue Oct 12, 2023 · 0 comments
Open

Provide a way to retrieve an org's GitHub App Installation #206

Mariatta opened this issue Oct 12, 2023 · 0 comments
Assignees

Comments

@Mariatta
Copy link
Member

For authenticating as a GitHub App, we need to have the app's installation_id.
https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app#generating-an-installation-access-token

The installation_id is passed to the webhook payload. But it can also be retrieved through REST API, for apps that doesn't use webhooks. (i.e background processes).

The installation id can be retrieved through these endpoints, depending on the org and the user:
GET /users/{username}/installation
GET /repos/{owner}/{repo}/installation
GET /orgs/{org}/installation
GET /app/installations

These endpoints need to be accessed using jwt, similar to how we handle get_installation_access_token. So it would be great if gidgethub can provide this abstraction too.

https://gidgethub.readthedocs.io/en/latest/apps.html#gidgethub.apps.get_installation_access_token

@Mariatta Mariatta self-assigned this Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant