-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request an access token failed with a 406 Not Acceptable error #83
Comments
I've just run into this myself while working on https://github.com/octokit/auth-oauth-app.js (would appreciate if you could give it a try!)
Could you pass a custom accept header to the request? octokit.request('POST https://github.com/login/oauth/access_token', {
client_id: 'xxx',
client_secret: 'xxx',
code: 'xxx',
headers: {
accept: "application/json"
}
}); That should work |
Your solution works like a charm, thanks ! |
Has anyone contacted support about this? |
Expiring user tokens are currently in beta and subject to change, see https://developer.github.com/changes/2020-04-30-expiring-user-to-server-access-tokens-for-github-apps/ |
@gr2m do you know about the regular access_tokens (say, without expiration), like in the original question of the issue? My point is, i'm confused that |
Ah I see, good point, I'll ping the docs team to clarify. The preview is only needed to use the new token refresh functionality |
@gr2m thanks for clarification!! Does it mean that overall using Github App (with its granular permissions) via the standard OAuth flow is not a preview feature and can be considered suitable for production? |
As far as I understand it, yes. Only the expiring tokens are new, the rest has been around for years |
For sake of everyone else googling this, I contacted support: |
The docs are being updated, the preview message will be removed. Thanks again Bogdan! |
This is a defect, and you should see updated docs in the next 24 hours! The
Yes, that is correct. Only expiring tokens are in beta. Everything else is production-ready. We are trying to clarify in our docs what the beta applies to. This is great feedback to hear and we'll use it to improve the experience around documenting beta features. |
Great, it's fixed now - thank you for quick reaction! 👍 |
Since we're on this.. (a bit different question about the related documentation as well) Is it expected that the Beta feature (expiration) is enabled by default now when creating an app? If this is intended, maybe its worth putting a "Beta" label near the flag or having it off by default to be consistent with the "Opt-in" strategy for existing apps? |
@klichukb thank you for the feedback! I've passed this feedback on to our engineering team to consider. 🙇♂️ |
but got:
Not sure what I am doing wrong
The text was updated successfully, but these errors were encountered: