We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

onna_spyder's avatar
onna_spyder
Helpful | Level 5
4 years ago

files/export returning empty paper docs

Hey everyone!

 

I'm having trouble getting the actual paper doc content when using the files/export endpoint. When I make the call on the document I do see the relevant export and file metadata attributes:

 

{
  "export_metadata": {
    "name": "_ Getting Started with Dropbox Paper.html",
    "size": 0,
    "export_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "paper_revision": 0
  },
  "file_metadata": {
    "name": "_ Getting Started with Dropbox Paper.paper",
    "parent_shared_folder_id": "9347998768",
    "id": "id:_GrEIRHlc2YAAAAAAAAAEw",
    "client_modified": "2021-03-31T22:19:59Z",
    "server_modified": "2021-04-09T23:17:34Z",
    "rev": "015bf925e6ed42c000000022d2f2430",
    "size": 200,
    "sharing_info": {
      "read_only": false,
      "parent_shared_folder_id": "9347998768",
      "modified_by": "dbid:AAASsxunZhVLU7W7WWEhyDByXbIzLwxSacg"
    },
    "is_downloadable": false,
    "export_info": {
      "export_as": "html",
      "export_options": [
        "html",
        "markdown"
      ]
    },
    "content_hash": "3b6bad4556d7e197f963d6cf0679e915baabbe6074dec9abd1ee0cb513e20212"
  }
}

However the response content is completely empty. I can see in the file metadata there is a size defined, however the size attribute in the export metadata is zero. I also attempted to use the Dropbox API Explorer but got the same result. Clicking on the download button downloads an empty file.

 

Anyone have ideas on why the the paper doc is empty, but does have the relevant metadata when calling the files/export endpoint?

  • onna_spyder's avatar
    onna_spyder
    4 years ago

    Ended up going with auth on behalf of the user. While using team admin (Dropbox-API-Select-Admin) partially works by returning metadata but no file content, user auth (Dropbox-API-Select-User) does return both metadata and the file content.

  • kylea's avatar
    kylea
    Icon for Dropbox Staff rankDropbox Staff

     

    I'm able to export the default getting started with Dropbox Paper file normally. 


    I see you are using the Dropbox-API-Select-Admin header.  Are you able to export the file using user auth?

    • onna_spyder's avatar
      onna_spyder
      Helpful | Level 5

      Actually yes when I update to use the document's user (Dropbox-API-Select-User) it does return the paper doc successfully. So seems like there may be an issue when attempting to use admin authentication. According to the docs the export endpoint should support admin auth.

       

      One thing to note that I missed is the paper docs I'm having trouble with were actually migrated to use the new paper doc setup. So I think there might be an issue there and I'm working with the technical contact who did the migration.

      • onna_spyder's avatar
        onna_spyder
        Helpful | Level 5

        Ended up going with auth on behalf of the user. While using team admin (Dropbox-API-Select-Admin) partially works by returning metadata but no file content, user auth (Dropbox-API-Select-User) does return both metadata and the file content.