Unable to create a repository using installed GitHub app

I’m trying to create a repo on behalf of user who installed the Github App. I followed the steps here 


I’m stuck on step 2  once where the code is exchanged for access_token.

When I try to post to this URL https://github.com/login/oauth/access_token with the code, I’m getting the 404 “Not Found” response.

Am I doing something wrong, isn’t possible to create and manage repos by Github App?

1 Like

Yes, it is possible to create repositories via a GitHub App. Unfortunately, you’re not even getting to that part. It appears that you’re getting stuck on the OAuth-like process for user-to-server access.

  1. If you supplied a state string in Step 1, did you supply that same state string in Step 2?
  2. Did you pass the code, the client ID, and client secret in step 2?
  3. Did you select Request user authorization (OAuth) during installation when creating or modifying your app?

Let us know.

  1. N/A - “**Request user authorization (OAuth) during installation” **is used
  2. Yes
  3. Yes

Suprisingly, this worked today, unsure why it didn’t work before.

1 Like

Glad to hear that it is working for you now :grinning: Let us know if you have more questions.