Created
May 21, 2021 22:51
-
-
Save chico/69da2430b272ae0ac1ea8c7637d3d8ae to your computer and use it in GitHub Desktop.
Generate OAuth access token for unsplash API
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
1. Go to https://unsplash.com/oauth/applications & click on your application | |
2. Get the access key (aka client_id) & secret key (client_secret) | |
3. Add http://localhost:3000/callback as a Redirect URI in the 'Redirect URI & Permissions' section | |
4. Tick 'Public access' and 'Read user access' and 'Write likes access' permissions | |
5. Click Save | |
6. Scroll back down to the 'Redirect URI & Permissions', click on 'Authorise' next to http://localhost:3000/callback | |
7. Authorize with your unsplash user & copy the code from the URL | |
8. Replace <code>, <clientid> & <client_secret> in below CURL and run it to get your access token. | |
curl -X POST 'https://unsplash.com/oauth/token?code=<code>&client_id=<clientid>&client_secret=<client_secret>&redirect_uri=http://localhost:3000/callback&grant_type=authorization_code' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment