octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
MIT License
6.97k stars 1.02k forks source link

[BUG]: Can't call the list users endpoint using an App instance #2603

Open statusfailed opened 9 months ago

statusfailed commented 9 months ago

What happened?

I'm trying to call the list users endpoint while authenticated as an app.

I expect this to return a list of users, but it gives an error.

Here's a minimal reproducing example:

const app = new App({
  appId: appId,
  privateKey: github_private_key,
});

// this is fine
//const response = await app.octokit.request("/app");

// this is broken
const response = await app.octokit.request("/users");
console.log(response);

Versions

Relevant log output

I get the following error:


    Error: [@octokit/auth-app] installationId option is required for installation authentication.

This sounds like I'm supposed to authenticate as an installation, but I don't want to do that. I want to query all github users, which should be a public endpoint.

Code of Conduct

github-actions[bot] commented 9 months ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

kevb10 commented 8 months ago

possible duplicate https://github.com/octokit/octokit.js/issues/2568