Google Groups

User Authentication using API + oAuth


Ed Burns Dec 21, 2011 10:33 AM
Posted in group: Disqus Developers
Trying to authenticate a user via
https://disqus.com/api/oauth/2.0/access_token/

I've learned that the documentation is incorrect in that it specifies
the request as GET when it has to be POST.

However, after switching to POST, I get an invalid_grant error when
attempting to authenticate a user:

My Request:
grant_type=password&client_secret=(SECRET)&client_id=(PUBLIC)&username=(USERNAME)&password=(PASSWORD)

The Response:
array(2) {
  ["error_description"]=>
  string(30) "Unallowed grant type: password"
  ["error"]=>
  string(13) "invalid_grant"
}

Since the documentation specifically tells me grant_type should be set
to 'password', I'm pretty stuck on this.

Anyone have any experience with authenticating a user with
access_token requests?

Ed