<?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 Re: I want to upload files to Dropbox Business using the Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427670#M22772</link>
    <description>&lt;P&gt;It looks like you or your HTTPS client truncated the error message. Please print out the full error message information, as it will contain more information about the specific error scenario.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2020 15:09:19 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-06-08T15:09:19Z</dc:date>
    <item>
      <title>I want to upload files to Dropbox Business using the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/426843#M22760</link>
      <description>&lt;P&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;# Summary&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I used the &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-upload" target="_self"&gt;"/2/files/upload" endpoint of the Dropbox API&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;However, the file is uploaded to your personal folder.&lt;/P&gt;
&lt;P&gt;I want to upload files to the team folder using the API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="6"&gt;# Tried&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I found the following questions.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-V2-Access-team-folders-of-bussines-plan-with-Folder-Files/td-p/268044" target="_blank" rel="noopener"&gt;https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-V2-Access-team-folders-of-bussines-plan-with-Folder-Files/td-p/268044&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It says "Use &lt;STRONG&gt;Dropbox-API-Path-Root&lt;/STRONG&gt;".&lt;/P&gt;
&lt;P&gt;The Dropbox-API-Path-Root requires Namespace.&lt;/P&gt;
&lt;P&gt;So I used &lt;A href="https://dropbox.github.io/dropbox-api-v2-explorer/team/#team_namespaces/list" target="_self"&gt;Dropbox API Explorer • namespaces/list&lt;/A&gt; to find the Namespace of the folder I wanted to upload.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found the desired value in the data returned by Dropbox API Explorer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{&lt;BR /&gt;      "name": "FOLDER_NAME",&lt;BR /&gt;      "namespace_id": "xxxxxxxxxx",&lt;BR /&gt;      "namespace_type": {&lt;BR /&gt;        ".tag": "shared_folder"&lt;BR /&gt;      }&lt;BR /&gt; },&lt;/PRE&gt;
&lt;P&gt;So I added the following code to PHP's program processing.&lt;/P&gt;
&lt;P&gt;This is written in the header section of Guzzle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$header = [&lt;BR /&gt;    'Authorization' =&amp;gt; 'Bearer ' . ACCESS_TOKEN,&lt;BR /&gt;    'Content-Type' =&amp;gt; 'application/octet-stream',&lt;BR /&gt;    'Dropbox-API-Path-Root' =&amp;gt; json_encode([&lt;BR /&gt;        '.tag' =&amp;gt; 'shared_folder',&lt;BR /&gt;        'shared_folder' =&amp;gt; 'namespace_id(xxxxxxxxxx)'&lt;BR /&gt;    ]),&lt;BR /&gt;    'Dropbox-API-Arg' =&amp;gt; json_encode([&lt;BR /&gt;        'path' =&amp;gt; '/example/upload/',&lt;BR /&gt;        'mode' =&amp;gt; 'add',&lt;BR /&gt;        'autorename' =&amp;gt; true,&lt;BR /&gt;        'mute' =&amp;gt; false,&lt;BR /&gt;        'strict_conflict' =&amp;gt; false,&lt;BR /&gt;    ]),&lt;BR /&gt;];&lt;/PRE&gt;
&lt;P&gt;However, I get a ".tag shared_folder does not exist" error.&lt;/P&gt;
&lt;P&gt;There was an error when I changed to '.tag' =&amp;gt; 'root'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why is this?&lt;BR /&gt;Please tell me how to do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 17:36:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/426843#M22760</guid>
      <dc:creator>suihakei</dc:creator>
      <dc:date>2020-06-05T17:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: I want to upload files to Dropbox Business using the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427081#M22764</link>
      <description>&lt;P&gt;The 'Dropbox-API-Path-Root' header does not support a 'shared_folder' option. Please refer to the Namespace Guide for information and examples on how to use the header, such as what options it supports:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_blank"&gt;https://www.dropbox.com/developers/reference/namespace-guide&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, it sounds like you probably want to use the 'namespace_id' option.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 18:50:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427081#M22764</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-06-05T18:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: I want to upload files to Dropbox Business using the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427218#M22767</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;As you explained, I set it as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Dropbox-API-Path-Root' =&amp;gt; json_encode([
        '.tag' =&amp;gt; 'namespace_id',
        'namespace_id' =&amp;gt; 'xxxxxxxxxxxxx',
]),&lt;/PRE&gt;&lt;P&gt;However, I get the following error:&lt;/P&gt;&lt;PRE&gt;`POST https://content.dropboxapi.com/2/files/upload` resulted in a `400 Bad Request` response:
Error in call to API function "files/upload": This API function operates on a single Dropbox account, but the OAuth 2 ac (truncated...)&lt;/PRE&gt;&lt;P&gt;Why is this?&lt;/P&gt;&lt;P&gt;I would appreciate it if you could advise me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 15:27:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427218#M22767</guid>
      <dc:creator>suihakei</dc:creator>
      <dc:date>2020-06-06T15:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: I want to upload files to Dropbox Business using the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427670#M22772</link>
      <description>&lt;P&gt;It looks like you or your HTTPS client truncated the error message. Please print out the full error message information, as it will contain more information about the specific error scenario.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 15:09:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-want-to-upload-files-to-Dropbox-Business-using-the-Dropbox-API/m-p/427670#M22772</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-06-08T15:09:19Z</dc:date>
    </item>
  </channel>
</rss>

