How can I allow a GitHub app to query which orgs it is installed on?

28 Views Asked by At

I have a GitHub app that was created on my account and it needs to be able to list all orgs on the account where it is installed. I'm using Oktokit and I've tried a couple methods:

github.Organization.GetAllOrganizationsForCurrent()

This gives me a 403 Resource not accessible error.

github.Organization.GetAllInstallationsForCurrent()

This gives me an error "A JSON Web token could not be decoded."

For both, I am using an installation token that has been working for all other functions so far (e.g. listing team members, repos, etc.). As for permissions, the app has admin: read/write on both Repositories and Organizations.

Any ideas?

0

There are 0 best solutions below