Repository creation via Github App Installation

I’m trying to create a repository on behalf of the user who installed Github App. I have created the app with permission to read and write on administration and code …After research Github App API these are some API I could think of:

I have tried them with Octokit something like:

 const installationOctokit = new Octokit({
      authStrategy: createAppAuth,
      auth: {
        appId,
        privateKey,
        installationId,
      },
    });

    const { data } = await installationOctokit.request('POST /orgs/{org}/repos', {
      org,
      name,
    });

but it still doesn’t work. I could do other requests with the code similar to that.

Do you guys know what wrong with that? How could I achieve that?

3 Likes