octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

statusfailed opened this issue · comments

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

  • Octokit 3.1.2
  • Node 21.2.0

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

  • I agree to follow this project's Code of Conduct

👋 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! 🚀