/user/orgs returns an empty object #73423
Replies: 2 comments 2 replies
-
🕒 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.
-
Hey, did you get an answer for this, I have the same problem |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I'm writing GitHub login functionality for an app, and I want to check if the user is in a given organisation (and therefore authorised to log in). I tried the
/user/orgs
endpoint, both with a PAT and a GitHub app, but it just returns an empty object.I think I've authenticated correctly and have the required scopes, as the response is
200
, not401
or403
. Am I somehow using the API incorrectly? Here's what I sent:And I received:
I found this StackOverflow question but there seems to be disagreement about how the endpoint actually works, so it didn't really help.
Beta Was this translation helpful? Give feedback.
All reactions