Listing GitHub organisation for Authenticated user does not see to work

  Kiến thức lập trình

I want to list all the organisation a user is part of, both public and private.

I am following the documentation here and it looks like what I need to list organizations for the authenticated user.

But when I try it, I get an empty array instead

curl -L 
  -H "Accept: application/vnd.github+json" 
  -H "Authorization: Bearer github_pat_..." 
  -H "X-GitHub-Api-Version: 2022-11-28" 
  https://api.github.com/user/orgs
[

]

What may I be doing wrong?

LEAVE A COMMENT