Created
June 6, 2011 01:28
-
-
Save aaronpearce/1009619 to your computer and use it in GitHub Desktop.
oAuth2 deviantART Commandline idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First you give the user the auth url (could open it automatically using open, start or browser) eg: | |
Client_id = your client id. | |
https://www.deviantart.com/oauth2/draft15/authorize?client_id=**&redirect_uri=http://aaronpearce.com&response_type=code | |
This will ask to auth (they will need to be logged in to the correct account) then it will redirect to that site. | |
That code is used to grab your access token. A specialized site will be put up to allow users to read this easier. (dA might put one up, I asked) | |
Then you will curl to the token is this: | |
curl https://www.deviantart.com/oauth2/draft15/token -d "client_id=**&redirect_uri=http://aaronpearce.com&grant_type=authorization_code&client_secret=**&code=**" | |
Where client_secret is your client secret key and client_id is your client id. Code is the code entered by the user into the app from the browser. | |
Then this will return JSON with the access_token. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment