GitHub API v3 Repsonse Different Based on Token

Viewed 15

I'm trying to get the teams for the logged in user for some token. With a personal access token, everything looks ok:

# properly returns a bunch of teams
curl -H "Authorization: token ghp_123abc" 'https://api.github.com/user/teams'
[
  {
    "name": "abc",
    "id": 123,
    "node_id": "abc=",
    "slug": "123",
...
]

but when using an OAuth bearer token from an OAuth app, I get an empty [] from the API:

$ curl -H "Authorization: bearer gho_123abc" 'https://api.github.com/user/teams'
[

]

I know both tokens are valid since the response for https://api.github.com/user is the same regardless of token, but I just have no idea why the response would be different based on token (both have proper permissions to read:org as confirmed in the response headers)

0 Answers
Related