Possible to get information about a private GitHub App when authenticated as another private GitHub App? #73308
Replies: 3 comments 5 replies
-
|
The GitHub API documentation says that you can get authenticated GitHub App information via the endpoint you're using. The point here is "authenticated GitHub App". I would say that this means that you can only retrieve information about the GitHub App that the current token is authenticated as. If I understood your case, you're authenticating as If you need to the information about Hope this clarifies it. 🍺 🍀 |
Beta Was this translation helpful? Give feedback.
-
|
There's a difference... The endpoint "Get an App" is used to get the PUBLIC information about a GitHub App. This endpoint does not require authentication if you provide the app's slug in the request URL. The endpoint "Get the authenticated app" is used to get the information about the authenticated GitHub App. This endpoint requires the JWT that the GitHub App uses to authenticate. 🍀 |
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I'm trying to get information about a private GitHub App (
app-1), while authenticated as another GitHub App (app-2). They are both private apps within my organization.This is the endpoint I'm using. It says "Works with GitHub Apps", so I'm assuming it should work?
I've generated an access token for
app-2using a private key and the app id, as described here.Then I generated an App Installation Token using curl:
Then I'm using the resulting token from that call to make another call:
I'm getting a
403 Forbiddenresponse with the following body:Isn't this supposed to work? If I change the slug name to the authenticated app (
app-2) then the request succeeds.Cross-post from https://stackoverflow.com/questions/77415156/get-information-about-a-private-github-app-while-authenticated-as-another-github
Beta Was this translation helpful? Give feedback.
All reactions