Close

Basic OAuth

A project log for Hackaday IO Android app

A basic Android app using the new Hackaday IO REST API

Paul ScottPaul Scott 05/05/2015 at 11:143 Comments

Been working on getting OAuth to work so far to log a user in. Close now, but running into an issue that the OAuth authorize URL seems to not exist...

https://hackaday.io/authorize

hmmm.....

Discussions

dandekaruna047 wrote 04/30/2016 at 06:04 point

i m passing access_token to url it will return response invalid

endpoint .so how to solve this problem how to get users data from hackaday

  Are you sure? yes | no

Paul Scott wrote 05/05/2015 at 17:31 point

OK, I am an official idiot! When I copied and pasted the client_secret
and client_id from the API docs page, I somehow copied a leading space
as well, which screwed up the whole thing! Sorry about being a dumbass!
Thanks for your help! All working now! :)

  Are you sure? yes | no

Edison Chen wrote 05/05/2015 at 17:01 point

Hey Paul, the URL should be with the required parameters: 
GET https://hackaday.io/authorize?client_id=CLIENT_ID&state=&response_type=code
The CLIENT_ID is your personal client id. And the access code will be returned to your call back url, will show 404 if you didn't provide a valid call back, but you can still find the access code as part of the response url. See our oauth documentation for more detail:
https://dev.hackaday.io/doc/api/oauth

  Are you sure? yes | no