Dropbox: Register App & Generate Token
Register App
-
Visit the Dropbox Apps registration portal using Developer's Portal.
-
Sign in with Dropbox credentials.
-
On the page, click Create App. The app creation page appears.
-
On the page, complete the following process to create an app:
i. Choose an API.
ii. Select the type of access you need.
iii. Enter a unique app name.
iv. Click Create App, and then provide redirect URIs, such as 'https://automationedge.com' or 'http://localhost:8080'.
v. To provide required permissions on App registration portal, click Permissions tab and provide the appropriate permissions defined in step documentation.
Generate Refresh Token URL and Run in browser
-
Call the following API in browser by adding the App Key and allow app to generate the authorization code:
https://www.dropbox.com/oauth2/authorize?client_id=<AppKey>&token_access_type=offline&response_type=code
-
Click Continue, and then click Allow.
-
Copy the authorization code from Access Code Generated.
Note:The authorization code is valid for short period of time.
-
Create Post request in postman as follows:
POST https://api.dropboxapi.com/oauth2/token
Headers:
Content-Type: application/x-www-form-urlencoded
Authorization:
Select basic auth and provide
Username: App Key
Password: App Secret
Body:
Select -> x-www-form-urlencoded
code: <authorization code generated in previous request>
grant_type: authorization_code -
Redeem the Refresh Token.