When I try to retrieve the Access Code from /api/oauth/2.0/
access_token/, I receive HTTP 400: Invalid API Version.
I've checked to make sure the format was correct. I tried it with
curl on the command line, and with the python code supplied by Disqus.
(https://github.com/disqus/disqus-api-demos/tree/master/comments)
Both return the same response.
So, some questions:
1. How long does the temporary code last? 10 secs, 10 mins? Does it
time out while I format the request by hand? (I'm just testing right
now.)
2. Is there a problem with the server code at Disqus that is
generating this request?
3. How long are the access tokens good for? I would really like to
allow the Users to authorize my app forever. I can't make them
authorize the app every time they log in.
Kevin
regarding question 3, you should read the documentation a bit
more(http://disqus.com/api/docs/auth/#response), the tokens are valid
for 30days, but you can make an automated process that use the refresh
token to request a new access_token without the user knowing.
The Invalid API Version error went away. Authentication works
perfectly now.
I am encountering an error when trying to use the refresh request you
pointed out to me.
If I try to make a request like the documentation specifies, the API
refuses it, saying redirect_uri is a missing parameter.
If I give it the same redirect_uri as the rest of my authentication
system, it redirects with ?error=unsupported_response_type appended to
the end.
If I pass it response_type=code, then it returns the regular "Would
you like to authorize this app to edit your Disqus forum" page, which
isn't good.
Is there a response type that I should pass into the GET request that
I don't know of?
Kevin
The documentation for token refresh is wrong on two points.
1. POST to https://disqus.com/api/oauth/2.0/access_token/ NOT GET to
https://disqus.com/api/oauth/2.0/authorize/
2. You must pass client_secret, along with grant_type, client_id, and
refresh_token.
Hopefully the doc can be updated so others won't be confused.
{"error_description": "Missing required parameter: grant_type", "error": "invalid_request"}
I'm literally about to give up hope on Disqus if I can't get this issue resolved within the next day or so. Support is slow at best and the documentation appears to be incorrect. This has been a very frusturating experience.
invalid parameter: code