Forum Discussion
Dropbox API v2, as API1 has been turned off
masplin,
Do mask sensitive data before uploading scripts or screenshots.
In your scenario, add a new blank query in Power BI Desktop, then paste the following code into the Advanced Editor of your query.
let
Source = Excel.Workbook(Web.Contents("https://content.dropboxapi.com/2/files/download", [Headers=[Authorization="Bearer <your access token>", #"Dropbox-API-Arg"="{""path"": ""/folder/path/filename.xlsx""}"]]), null, true)
in
Source
And I would commend you firstly test that if your API returns correct result in DropBox API Explorer.
Regards,
Lydia
Hi Lydia
I'm obviously doing somethnig stupid. the path to my file is U:\Dropbox\DataModel\SourceFiles\Input.xlsx
In API explorer I got this
Can you tell me where i've gone wrong please?
Thanks
Mike
- granthworth8 years agoKudo Kingpin
Hey masplin
I am still working on getting ours resolved also. I have not gotten around the issue completely yet but I was able to get at least a portion of Lydia's fix to work. See below for my info. Hope this helps.
- masplin8 years agoImpactful Individual
let an "s" of the file name Duh!!!!
Brilliant
- masplin8 years agoImpactful Individual
Ok so I got a repsonse from the API explorer uses this token and path, and can download the file however i then put this code in Power Query and get an error "unable to conenct to the remote server"? Any idea?
let Source = Excel.Workbook(Web.Contents("https://content.dropboxapi.com/2/files/download", [Headers=[Authorization="Bearer lkPfa4vOd-AAAAAAAAAAXpFuGV2UKJk0D3WGQtPjNeIeZNwdopvcaSs_y3gguRYY", #"Dropbox-API-Arg"="{""path"": ""/DataModel/SourceFiles/Inputs.xlsx""}"]]), null, true) in Source