Request to login/oauth/access_token returns error #24602
-
Hello! I tried virtually everything and it’s not working. I can successfully get code and state. But, when I try to exchange them to access token
request fails with no error message and 406 status code.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi @likern, Welcome to the Github Community Forum! I search for some solution and i find this where explain the error code: developer.mozilla.org/Status/406. It seems that you are not send the right list of acceptable values defined in the request’s proactive content negotiation headers. Did you follow this guide? -> developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/ -Gabriele- Mark helpfull posts with Accept as Solution to help other users locate important info. Don’t forget to give Kudos for great contents! |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! You really helped me 😉 I added Accept: ‘application/json’ and this starts working =) |
Beta Was this translation helpful? Give feedback.
-
Has anyone contacted support about this? |
Beta Was this translation helpful? Give feedback.
-
Hi guys, i cant deal with this refreshing access_token with using refresh token. curl --location --request POST ‘https://github.com/login/oauth/access_token’ it returns 400 if content is json if content type is form data or x-www-form-urlencoded service returns this |
Beta Was this translation helpful? Give feedback.
Hi @likern,
Welcome to the Github Community Forum!
I search for some solution and i find this where explain the error code: developer.mozilla.org/Status/406.
It seems that you are not send the right list of acceptable values defined in the request’s proactive content negotiation headers.
Did you follow this guide? -> developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/
-Gabriele-
Mark helpfull posts with Accept as Solution to help other users locate important info. Don’t forget to give Kudos for great contents!