Overview
OAuth 2.0 is an industry-standard protocol for secure delegated access.Instead of sharing passwords, users grant your app permission to act on their behalf using tokens. Here’s how the Dribbble OAuth flow works:
- Register your app to get a
Client IDandClient Secret. - Direct users to the authorization URL.
- Receive a code when they approve your app.
- Exchange that code for an access token.
- Use the token to make authenticated requests.
Step 1: Register your application
- Create an account on the Dribble home page or login.
- Visit the Applications page.
- Select Applications from the side menu
- Click Register a New Application.
- Enter your app details and callback URL.
- Click Create Your Application.
- Your Client ID and Client Secret show up at the bottom of the page. Copy them and keep them safe.
Step 2: Request user authorization
-
Redirect users to the following URL:
-
Once the user approves, Dribbble redirects them to your callback URL with a
code:
Step 3: Exchange the code for an access token
Use your Client ID, Client Secret, and Authorization Code to request a token.Store your access token securely. Do not expose it publicly (for example, in frontend code or GitHub repos).
Step 4: Use the access token - Fix the code here
Include your token in the query parameter:Handle Common Errors
| Error | Description | How to fix |
|---|---|---|
invalid_client | Incorrect Client ID or Secret | Double check the client_id and client_secret to make sure they are correct |
invalid_grant | Code expired or reused | Request a new authorization code |
unauthorized | Token missing or invalid | Include the Authorization header |
400 Bad Request | Missing required parameter | Verify your query parameters |
Redirect URI Mismatch | Redirect URI doesn’t match the previous one | Provide a redirect_uri that matches what you registered or leave out this parameter to use the default one registered with your application |
Token Management Tips
- Tokens typically don’t expire quickly, but can be revoked anytime via your Dribbble account.
- Always use HTTPS to keep tokens secure in transit.