Forum Discussion

Jagadeesh's avatar
Jagadeesh
Explorer | Level 4
3 years ago

files_list_folder returning 500 Internal Server Error

# from src.dropbox_plugin.dropbox_extension import DropBoxExtension
import dropbox
import os

drop = dropbox.Dropbox(oauth2_access_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
oauth2_refresh_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
app_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', app_secret='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')


def get_all_files_from_public_url(dropboxs, root_folder, root_shared_link, all_files):
root_folder2 = ''
if root_folder:
root_folder2 = f'/{root_folder}'
entries = drop.files_list_folder(path=root_folder2, shared_link=root_shared_link)
print('done for')
while True:
for file in entries.entries:
if isinstance(file, dropbox.files.FolderMetadata):
get_all_files_from_public_url(dropboxs, os.path.join(root_folder, file.name), root_shared_link,
all_files)
else:
all_files.append(os.path.join(root_folder, file.name))
if not entries.has_more:
break
entries = drop.files_list_folder_continue(entries.cursor)

data = []
link = dropbox.files.SharedLink(url='https://www.dropbox.com/scl/fo/cycmeqthp4kerxusxo9yt/h?rlkey=r9zd7ee6r7chhnwrui59m94d4&dl=0')
get_all_files_from_public_url(
drop, '', link, data)

# 11.25.0

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    Thanks for the report! We're looking into it. I'll follow up here once I have an update for you.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    This should be working again now. Please let us know if you're still seeing any issues. Thanks!

  • Jagadeesh's avatar
    Jagadeesh
    Explorer | Level 4
    3 years ago

    Yes this is resolved now, Thank you very much Greg.

     

    ..Jagadeesh

About Dropbox API Support & Feedback

Node avatar for 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!