Closed sircon closed 8 months ago
I had similar problem (406 error), and solved it by overriding accept
header when constructing client:
OAuth2.Client.new([
strategy: ...,
...,
headers: [{"accept", "application/json,application/x-www-form-urlencoded"}]
])
This bit me too, but I don't see anywhere in the repo where it explicitly sets that value on the Accept
header, just Content-Type
. Should the OAuth2.Client.new
function have a default that sets Accept
to */*
?
Thanks @sickill, I will give it a try. If it works then it seems that is missing the accepts application/json
header as it has the other one.
This issue has been automatically marked as "stale:discard". If this issue still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment.
Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!
I'm having issues with refreshing a Spotify token using the OAuth2 library.
This is the debug I'm getting.
Doing the same request using Curl or Postman works alright, but via OAuth2 always gives a 406...
This would be the Curl equivalent:
I wonder what am I doing wrong.
This is my last attempt following the Readme:
I'm using OAuth2 version 2.0.0, in case this is relevant.
Thanks in advance for the help, Miguel