cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Files Uploaded via PowerShell Script Not Appearing

Files Uploaded via PowerShell Script Not Appearing

RWMOREY
Helpful | Level 6
Go to solution

Hi --

 

We have a PowerShell script that uploads files to Dropbox but since the Dropbox update / upgrade at the end of last week the files are not appearing on Dropbox. The script does not report any errors. I also tried creating a directory through the API end point using Postman and I got a success message in response to the API call but the directory I created did not appear either.

 

Is this a known issue related to the upgrade? Or do I need to refresh our bearer token or something? 

 

If I copy files to Dropbox from my PC using the Dropbox client the files appear as normal.

 

Any suggestions would be appreciated.

 

Thanks

 

Rich

 

1 Accepted Solution

Accepted Solutions

RWMOREY
Helpful | Level 6
Go to solution

HI --

 

Ok, I figured out I needed to add "Dropbox-API-Path-Root" to my request header and specify the correct "namespace_id" value for our shared folder so now everything is working again.

 

Rich

 

View solution in original post

6 Replies 6

Greg-DB
Dropbox Staff
Go to solution

There haven't been any recent changes to the API that should have caused uploads to stop working.

 

Can you print out and share the response you get from the API? If it's not an error, it should contain the metadata of the uploaded file or created folder.

 

Also, how/where are you checking for the new file/folder? If you're looking on the web site, make sure you're signed in to the relevant account and are looking in the correct location.

 

By "upgrade", it sounds like you may be referring to your team switching to the "team space" configuration. Note that by default, API calls still operate in the "member folder" of the connected account, not the "team space". So, if you're looking at the Dropbox web site for a file uploaded with the default parameters, make sure you're looking in your member folder. (Alternatively, you can configure API calls to operate in the "team space" instead, if desired. To do so, you'd need to set the "Dropbox-Api-Path-Root" header. You can find information on this in the Team Files Guide.)

RWMOREY
Helpful | Level 6
Go to solution

Hi --

 

I made a call to this API end point https://api.dropboxapi.com/2/files/create_folder_v2 with our token in the header and this is the JSON payload

 

"path""/TLP Software/Release/Staging/CNST/TEST_FOLDER"}
 
This was the response from your API
 
{
    "metadata": {
        "name""TEST_FOLDER",
        "path_lower""/tlp software/release/staging/cnst/test_folder",
        "path_display""/TLP Software/Release/Staging/CNST/TEST_FOLDER",
        "id""id:7YfNtzu3TBAAAAAAAAAAXg"
    }
}
 
But when I go here
 
 
I do not see the "test_folder" that was supposedly created. 
 
However, if I run the same API call again, I get this response
 
{
    "error_summary""path/conflict/folder/...",
    "error": {
        ".tag""path",
        "path": {
            ".tag""conflict",
            "conflict": {
                ".tag""folder"
            }
        }
    }
}
 
Which indicates the folder already exists. So the question is, where is it?
 
I'm wondering if the bearer token we are using is associated with a users Dropbox account / folder structure and so I need to get a token that is for our "Team" folder?
 
Thanks
 
Rich
 

Greg-DB
Dropbox Staff
Go to solution

Based on the URL of the Dropbox web site you shared, it seems like you're looking at your "team space". The API calls would be operating relative to your "member" folder by default, so you won't see the new files/folders in your team space by default. You'll need to look in your member folder instead. Your member folder is typically given your name, so check for a folder with your name on the web site.

 

Alternatively, refer to my previous comment for information on how to interact with the team space via the API.

 

You do not need to make a new access token for this.

RWMOREY
Helpful | Level 6
Go to solution

HI --

 

Ok, I figured out I needed to add "Dropbox-API-Path-Root" to my request header and specify the correct "namespace_id" value for our shared folder so now everything is working again.

 

Rich

 

RWMOREY
Helpful | Level 6
Go to solution

Why was my comment related to searching for a specific file type move or "merged" into a totally unrelated conversation!? And now the subject of the conversation which was originally "Files-Uploaded-via-PowerShell-Script-Not-Appearing" is now "Re: Searching for a specific file type"

 

My response was to this thread "https://www.dropboxforum.com/t5/Delete-edit-and-organize/Searching-for-a-specific-file-type/m-p/6460..." because the accepted "solution" does not actually solve the question the user asked.


WTF?

Greg-DB
Dropbox Staff
Go to solution

@RWMOREY Thanks for the note. I don't know why your comment was posted in this thread, but I've now moved it to the "Searching for a specific file type" thread for you.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    RWMOREY Helpful | Level 6
What do Dropbox user levels mean?