Quick Start
In this guide, you’ll create a Dropbox app, configure the required permissions, get an access token, and use the Riviera API to extract metadata from a file.
1. Create a Dropbox app
Head to the Dropbox App Console and click Create app.
- Choose Scoped access as the API type.
- Select Full Dropbox to give your app access to all files and folders in the user’s Dropbox account.
- Name your app and click Create app.
2. Configure permissions
On the Permissions tab of your app’s settings, enable the scopes your app needs:
Click Submit to save your permission changes.
3. Get an access token
For testing, generate a short-lived access token from the Settings tab of your app in the App Console. For production apps, implement the OAuth 2.0 flow.
4. Extract metadata from a file
Use the GetMetadataAsync endpoint to extract file metadata. Thefile_id_or_url parameter accepts a url, path, or file_id. Refer to the File Access Guide for additional details. The following example uses a path that must point to an existing file in your connected Dropbox account.
A successful response contains an async_job_id:
Save the returned async_job_id for the next request.
5. Check the extraction status
Pass the async_job_id to GetMetadataAsyncCheck to check the status of the operation.
While the operation is still in progress, poll every 15 seconds until the job completes or fails. If you receive a rate-limited (429) response, honor the Retry-After header before retrying.
When processing is complete, the response contains the extracted metadata:
The complete tag indicates that processing has finished. The metadata object contains the metadata extracted from the file.
If processing is still underway, the response returns an in_progress tag:
If processing fails, the response returns a failed tag with details about the error. For example:
Next steps
- Explore the Riviera API Reference to discover additional endpoints.
- Learn about Authorization to authenticate production applications.
- Read Extracting Content and Metadata for a deeper look at working with extracted content and metadata.