cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Ross uses Dropbox to answer some new house questions here!

Discuss Dropbox Developer & API

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

Re: files/export returning empty paper docs

files/export returning empty paper docs

onna_spyder
Helpful | Level 5

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.

Screen Shot 2021-06-10 at 3.41.48 PM.png 

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

1 Accepted Solution

Accepted Solutions

Re: files/export returning empty paper docs

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.

View solution in original post

3 Replies 3

Re: files/export returning empty paper docs

kylea
Dropboxer

 

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?

Re: files/export returning empty paper docs

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.

Re: files/export returning empty paper docs

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.

View solution in original post

Need more support?