<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export legacy paper via python sdk does not work in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774150#M33834</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am using the latest&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;dropbox-sdk-python&lt;/A&gt;. Here is my python code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import os
import dropbox

from dropbox.paper import ExportFormat

dbx = dropbox.Dropbox(os.getenv('DROPBOX_ACCESS_TOKEN'))

dbx.paper_docs_download_to_file('temp.md', '12345678', ExportFormat.markdown)
# The file only contains the title of the paper.

res2 = dbx.paper_docs_download('12345678', ExportFormat.markdown)
# I don't know how extract content from res2
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The downloaded file only contains the title of the paper.&amp;nbsp;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2024 07:00:09 GMT</pubDate>
    <dc:creator>jianliao</dc:creator>
    <dc:date>2024-05-30T07:00:09Z</dc:date>
    <item>
      <title>Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774150#M33834</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am using the latest&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;dropbox-sdk-python&lt;/A&gt;. Here is my python code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import os
import dropbox

from dropbox.paper import ExportFormat

dbx = dropbox.Dropbox(os.getenv('DROPBOX_ACCESS_TOKEN'))

dbx.paper_docs_download_to_file('temp.md', '12345678', ExportFormat.markdown)
# The file only contains the title of the paper.

res2 = dbx.paper_docs_download('12345678', ExportFormat.markdown)
# I don't know how extract content from res2
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The downloaded file only contains the title of the paper.&amp;nbsp;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 07:00:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774150#M33834</guid>
      <dc:creator>jianliao</dc:creator>
      <dc:date>2024-05-30T07:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774190#M33836</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1842589"&gt;@jianliao&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Keep in mind that the methods you're using (and the corresponding API endpoints) are deprecated and can be used only on old accounts that are not migrated yet. Did you check the type of your account in use? Better use export functionality - it's the successor. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;About the result, that you don't know what is - did you take a look on &lt;A title="Exports and downloads Paper doc either as HTML or markdown" href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.paper_docs_download" target="_blank" rel="noopener"&gt;docs&lt;/A&gt;? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; Reading is not something bad!&lt;/P&gt;&lt;P&gt;Hope this gives direction.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 08:21:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774190#M33836</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2024-05-30T08:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774320#M33842</link>
      <description>&lt;P&gt;I read the doc and run this line of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from dropbox.users import UserFeature

print(dbx.users_features_get_values([UserFeature.paper_as_files]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It return false. Unfortunately, my company account is still on legacy paper.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For below API call, I want to know how extract the content of the paper.&lt;/P&gt;&lt;PRE&gt;res2 = dbx.paper_docs_download('12345678', ExportFormat.markdown)&lt;/PRE&gt;&lt;P&gt;When I print out res2, I got this:&lt;BR /&gt;&lt;SPAN&gt;(PaperDocExportResult(mime_type='text/x-markdown', owner='jianliao@xxxx.com', revision=76, title='Build something cool'), &amp;lt;Response [200]&amp;gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 15:58:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774320#M33842</guid>
      <dc:creator>jianliao</dc:creator>
      <dc:date>2024-05-30T15:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774366#M33843</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1842589"&gt;@jianliao&lt;/a&gt; I just tried this out with an account on legacy Paper and I was able to get the body of the document using paper_docs_download_to_file and ExportFormat.markdown. Can you double check that the particular document for the doc ID you're specifying has a non-empty body, e.g., on the Dropbox web site?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.paper_docs_download" target="_blank"&gt;paper_docs_download&lt;/A&gt;, that returns a (&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/paper.html#dropbox.paper.PaperDocExportResult" target="_blank"&gt;dropbox.paper.PaperDocExportResult&lt;/A&gt;, &lt;A href="https://docs.python-requests.org/en/latest/api/#requests.Response" target="_blank"&gt;requests.models.Response&lt;/A&gt;), you can access the data like this, for example:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;metadata, response = dbx.paper_docs_download(DOC_ID, ExportFormat.markdown)
print(response.text)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 17:49:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774366#M33843</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-05-30T17:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774367#M33844</link>
      <description>&lt;P&gt;Try something like following:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;res, stream = dbx.paper_docs_download('12345678', ExportFormat.markdown)
print(f"Title: {res.title}\nOwner: {res.owner}\nMime:  {res.mime_type}")
print(stream.text)&lt;/LI-CODE&gt;&lt;P&gt;Are you sure you have docs read? 🧐 Anyway...&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 17:49:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774367#M33844</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2024-05-30T17:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Export legacy paper via python sdk does not work</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774578#M33851</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 16:57:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Export-legacy-paper-via-python-sdk-does-not-work/m-p/774578#M33851</guid>
      <dc:creator>jianliao</dc:creator>
      <dc:date>2024-05-31T16:57:09Z</dc:date>
    </item>
  </channel>
</rss>

