Skip to content

OAuth access token API Github error NotFound #69336

Closed Answered by mikeaustin
caiosamarone asked this question in API and Webhooks
Discussion options

You must be logged in to vote

I did get it working after I added Content-Type and Accept headers, and also removed the authorized app every time I test.

Example:

  const response = await fetch('https://github.com/login/oauth/access_token', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
    },
    body: JSON.stringify({
      client_id: '$$$',
      client_secret: '$$$$$$$$$$',
      code,
    }),
  });

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mikeaustin
Comment options

Answer selected by caiosamarone
@kolserdav
Comment options

Comment options

You must be logged in to vote
1 reply
@AaronConlon
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions and conversations related to APIs or Webhooks Question
7 participants