You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Glority's avatar
Glority
Helpful | Level 5
5 years ago

restore files,but return error: invalid_revision with Picture modified a few months ago

Hi,

I am confused about the correct use of the restore api.

i find some pictures in my account which are upload just several days, delete it and restore,everything is ok!

but, if these pictures are upload several months ago, delete it and restore,i will get an error from server:invalid_revision,

if i go to "https://www.dropbox.com/" sign in and restore the pictures just deleted, and then retry to delete and restore using api rather than directly visit 'dropbox' site to restore,it's also ok!

is the way i use api wrong? But in most cases the restore api can be used successfully, or it could be..

please help me! thanks. Below is my part of code.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    An "invalid_revision" error from /2/files/restore should mean "The revision is invalid. It may not exist or may point to a deleted file.". In this case, it sounds like it's because the file revision you're using when calling the API is for a version of the file from several months ago, which is no longer be available. 

     

    File version retention length will vary by account type. For instance, Dropbox Basic accounts only store file versions for 30 days. You can find more information on that in the help center.

    • Glority's avatar
      Glority
      Helpful | Level 5

      Thank you for your reply!

      Your reply has helped me a lot, but I still don’t understand: In the basic account, the files deleted one month ago are the same as the files deleted the files just now which upload one month ago ? All they can't restore, please let me know, thank you!

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        I'm not sure I understand your latest message. Can you clarify? Alternatively, if you have questions about Dropbox file restorations and version history retention in general, you can contact support directly.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 6 hours ago
333 Following

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 or Facebook.

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!