Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 2.68 KB

File metadata and controls

61 lines (40 loc) · 2.68 KB

When creating a developer account: Clik the link Fill your app details and the callback URL yourself

The callback URL is the URL to which Dribbble will redirect users after they authorize your app. For example Website URL: https://myportfolio.com

Callback URL: https://myportfolio.com/auth/dribbble/callback

For me, I used

Callback URL: https://substack.com/@mwithheart/auth/dribbble/callback

AFter clicking the Create Your Appliaction button, your applications page is opeend. At the bottom of the page, you get your: Client ID and Client Secret.

These are valuable details that uou should keep safe for later.
Recommendation: The Client ID & Client Secret should be created as a field with a copy button.

Base URL

api.dribbble.com/v2/

Then, get an access token

This part is actually on =teh OAuth page but it's so unclear. I got the below from this page: https://matthewelsom.com/blog/display-shots-on-webpage-with-dribbble-v2-api.html. But I will be editing teh wordings for my use:

Using Postman was the easiest way I found to do this, so download and install that first.

In v1 of the API, you were provided with your access token when registering your app, with v2 we need to do a little extra work to generate the token.

Authorizing

Open a browser window and log into your Dribbble account In a new window, go to the following url: https://dribbble.com/oauth/authorize?client_id=CLIENT_ID (Replace CLIENT_ID with the long Client ID number provided when you registered your application) A Authorization Screen will appear with the name of the application you registered, choose to Authorize your application Authorize Application

After authorizing, you will be redirected to a URL that looks similar to this:

http://callback_url?code=9892aebffbb8c82d93e3f2c63a1dab160cefcb1ae269df3a4315924b87246a67 Important The http://callback_url will be the callback URL you entered when registering your application. Copy the long code at the end of this URL, in the example above the code is: 9892aebffbb8c82d93e3f2c63a1dab160cefcb1ae269df3a4315924b87246a67

Get the token

Using Postman, create a new Request Select POST, and enter the following URL: https://dribbble.com/oauth/token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=COPIED_CODE Replace the CLIENT_ID and CLIENT_SECRET with the ID and Secret provided by Dribbble after successfully registering your app Replace the COPIED_CODE with the code you just copied from the callback URL page Hit Send, and your Access Token will be returned, mine looked like this:

{ "access_token": "9f061d26c5a8be96b17a81718959a67dd54ca9669ca41752777193f7cc5be7c3", "token_type": "bearer", "scope": "public", "created_at": 1520591461 }