Forum Discussion
Connecting to data source hosted on Dropbox
The documentation on their developer site is quite comperhansive https://www.dropbox.com/developers/documentation/http/documentation
As for some boilerplate code to get you going have a look at the snippet below for an example of geting folder listing.
let
data = [ path= "/code",
recursive=false,
include_media_info=false,
include_deleted=false,
include_has_explicit_shared_members=false],
header = [ #"Authorization"="Bearer ZZZZZZZZZZZ",
#"Content-Type"= "application/json"],
response = Web.Contents("https://api.dropboxapi.com/2/files/list_folder",[Content=Json.FromValue(data),Headers=header]),
out = Json.Document(response,1252)
in
outThe only setup that I had to do on the Dropbox site was to create an App in the developer space and then generate an access key, which by the way is ZZZZZZZZZZ in my snippet.
I tried your code and got this error. I just created an app and added the access code where you had zzzzzzz.
DataSource.Error: Web.Contents failed to get contents from 'https://api.dropboxapi.com/2/files/list_folder' (400): Bad Request
Details:
DataSourceKind=Web
DataSourcePath=https://api.dropboxapi.com/2/files/list_folder
Url=https://api.dropboxapi.com/2/files/list_folder
Any ideas what this means?
Thnaks
Mike
- hugoberry9 years agoResponsive ResidentI have created a DropBox data connector using the Power Query Extensions SDK. You are welcome to try it or check the code for a possible answer
https://github.com/Hugoberry/PowerQueryConnectors/blob/master/src/DropBox/DropBox.pq- masplin9 years agoImpactful Individual
Actually I managed to set up the new personal gateway so that i coud use the files on dropbox as a data source for a PBIX file
I think thisis doing somethnig different? Coudl you just explain in what instances I woudl be looking to use this for futre refernece?
Thnaks
Mike
- ImkeF9 years agoCommunity Champion
Hi guys,
thanks for these helpful different solutions! I've picked up some code bits from this thread and created a function that makes it pretty easy to grab files from a dropbox-folder: https://www.youtube.com/watch?v=eEVRO-Zc7pg
This should be helpful for folks who are not so tech-savy and might stumble across this post.