Resource not accessible by integration -- getting permissions to other organizations #1624
Answered
by
gr2m
blackgirlbytes
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
gr2m
Dec 3, 2021
Replies: 1 comment 2 replies
-
You can retrieve an octokit instance authenticated as the app by doing this const appOctokit = app.auth() Once authenticated as the app, you can find out the installation ID for the org you are interested in https://docs.github.com/en/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app
const { data: installation } = await appOctokit.request('GET /orgs/{org}/installation', {
org: 'myorg'
}) With the const myOrgOctokit = app.auth(installation.id) Then use Can you give that a try? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
blackgirlbytes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can retrieve an octokit instance authenticated as the app by doing this
Once authenticated as the app, you can find out the installation ID for the org you are interested in
With the
installation
object, you can create a new instance for that installation