posborne / putio-sync

Python daemon that automatically downloads files from put.io
MIT License
29 stars 12 forks source link

400: Bad Request Unauthorized Client #13

Closed seanieb closed 10 years ago

seanieb commented 10 years ago

The Oath Token flow results in an error. http://put.io/v2/oauth2/apptoken/6017 goes to: http://put.io/v2/oauth2/authenticate?client_id=6017&response_type=oob&redirect_uri=na

posborne commented 10 years ago

I have seen this as well. I tried to follow the same basic flow that other apps use, but the documentation for the "apptoken" URL and what the settings for the app on put.io itself seem lacking. I'll ping put.io to see if they can clarify.

seanieb commented 10 years ago

https://put.io/v2/docs/gettingstarted.html#sign-up This is the URL in the Docs: https://api.put.io/v2/oauth2/authenticate ?client_id=YOUR_CLIENT_ID &response_type=code &redirect_uri=YOUR_REGISTERED_REDIRECT_URI

seanieb commented 10 years ago

Actually the AJAX method looks like it would be more suitable for the app: https://api.put.io/v2/oauth2/authenticate ?client_id=CLIENT_ID &response_type=token &redirect_uri=YOUR_REGISTERED_REDIRECT_URI

posborne commented 10 years ago

Ok, I'm an idiot... certifiably. I went through the steps of setting up the ajax method which worked fine, posting back to a path on this projects github.io site. During final testing, I noticed that the CLIENT_ID I had encoded in the app was typod. I had 6017 and the id I have registered is 1067. I tested again with the old method and it is working fine.

posborne commented 10 years ago

I'm going to close, but let me know if you are still having problems.