We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
nive
3 years agoExplorer | Level 4
Not able to access the folders inside scoped app folder
There is a scoped app folder , and Im trying to access a zip file in a folder called "myfolder" in the Apps folder . In the script , I gave the dropbox path as /Apps/myfolder/download.zip , however ...
nive
3 years agoExplorer | Level 4
Hello @Здравко ,
Thank you so much for your solution . I fixed the issue . I greatly appreciate your quick help 🙂
karver
3 years agoNew member | Level 2
can you tell me how you fixed the issue, i am facing the same problem
- karver3 years agoNew member | Level 2
i need to download zip file from dropbox
this is the error i am receiving :
Invoke-RestMethod : {"error_summary": "path/not_found/...", "error": {".tag": "path", "path": {".tag": "not_found"}}}
My script looks like this
function Get-DropboxFolder{[CmdletBinding()]Param([string]$DropboxFolder,[string]$OutputFolder,[string]$FolderPath)$body = '{"path":"/'+$DropboxFolder+'"}'Write-Output $body$AuthToken = 'xxxxxxxx'$token = "Bearer $AuthToken"#The file will be downloaded as ZIP to the Temp folder of the user$Tempfolder = "$env:temp\Downloaded_File.zip"if (!(Test-Path $FolderPath)) {Write-Verbose "Downloading the folder…"Invoke-RestMethod `-Method POST `-Headers @{ "Authorization" = $token; "Dropbox-API-Arg" = $body} `-OutFile $Tempfolder -ContentType ""#The file will be extracted and then removed from the tempwrite-verbose "Extracting the folder…"Expand-Archive -LiteralPath $Tempfolder -DestinationPath $OutputFolder -ForceRemove-Item $Tempfolder -ForceWrite-Verbose "The folder has been downloaded."}else{Write-Verbose "Folder Exists"}}$DropboxFolder = "Apps/WAE-DE-dev-win11/file.zip"$OutputFolder = "$env:HOMEDRIVE\Softwares"$FolderPath = "$OutputFolder\Software01"Get-DropboxFolder -DropboxFolder $DropboxFolder -OutputFolder $OutputFolder -FolderPath $FolderPath -Verbose - Greg-DB3 years ago
Dropbox Community Moderator
karver Apps with the "app folder" access type can only access the contents of the special app folder that gets automatically created for it. If your app has the "app folder" access type, then it will only be able to access files in the app folder, and the root for any path value supplied by that app will automatically be the app folder root. You can find more information on app permissions here. For example, If your app has the app folder access type and you're trying to access something you can see on the Dropbox web site at
"/Apps/<app folder name>/folder/example.csv", you should only send thepathvalue as"/folder/example.csv".So in your case, instead of this line:
$DropboxFolder = "Apps/WAE-DE-dev-win11/file.zip"try it like this:
$DropboxFolder = "file.zip" - Здравко3 years agoLegendary | Level 20
Hi karver,
You have 2 errors, at least. The first one is obvious - you have pointed something that doesn't exist (likely it's the same as explained before; not mandatory, of course). The other one is the fact that you're trying to download folder content using method suitable for files only! To be able download a folder as zip file take a look on /2/files/download_zip. 😉
Hope this gives direction.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!