<?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: Business API v2 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146774#M4756</link>
    <description>&lt;P&gt;I still get the error. Also with any API call on v2. Any idea of what I should change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2015 07:47:51 GMT</pubDate>
    <dc:creator>Jamal B.1</dc:creator>
    <dc:date>2015-11-07T07:47:51Z</dc:date>
    <item>
      <title>Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146771#M4753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I can't seem to be able to use the Business API in its V2 incarnation.&lt;/P&gt;
&lt;P&gt;First of all, what is the correct header to send?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http#teams" target="_blank" rel="nofollow noreferrer"&gt;Here&lt;/A&gt; it's&amp;nbsp;Dropbox-API-Select-Team-Member and &lt;A href="https://www.dropbox.com/developers/business" target="_blank" rel="nofollow noreferrer"&gt;here&lt;/A&gt; it's&amp;nbsp;X-Dropbox-Perform-As-Team-Member.&lt;/P&gt;
&lt;P&gt;This works in v1:&lt;/P&gt;
&lt;PRE&gt;url = 'https://content.dropboxapi.com/1/files_put/auto'&lt;/PRE&gt;
&lt;PRE&gt;headers = {&lt;BR /&gt; 'Authorization': 'Bearer ' + access_token,&lt;BR /&gt; 'Content-Type': 'application/json',&lt;BR /&gt; 'X-Dropbox-Perform-As-Team-Member': member_id&lt;BR /&gt;}&lt;/PRE&gt;
&lt;PRE&gt;with open(local_filename, 'rb') as f:&lt;BR /&gt; r = requests.put(url + remote_path, headers=headers, data=f)&lt;/PRE&gt;
&lt;P&gt;But this does not work in v2:&lt;/P&gt;
&lt;PRE&gt;url = 'https://content.dropboxapi.com/2/files/upload'&lt;/PRE&gt;
&lt;PRE&gt;headers = {&lt;BR /&gt; 'Authorization': 'Bearer ' + access_token,&lt;BR /&gt; 'Content-Type': 'application/octet-stream',&lt;BR /&gt; "Dropbox-API-Arg": "{\"path\":\"" + remote_path + "\"}",&lt;BR /&gt; 'Dropbox-API-Select-Team-Member': member_id&lt;BR /&gt;}&lt;/PRE&gt;
&lt;PRE&gt;with open(local_filename, 'rb') as f:&lt;BR /&gt; r = requests.post(url + headers=headers, data=f)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It fails with:&lt;/P&gt;
&lt;PRE class="p1"&gt;{&lt;/PRE&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"error": {&lt;/PRE&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;".tag": "invalid_access_token"&lt;/PRE&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;},&lt;/PRE&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"error_summary": "invalid_access_token/"&lt;/PRE&gt;
&lt;PRE class="p1"&gt;}&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:38:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146771#M4753</guid>
      <dc:creator>Jamal B.1</dc:creator>
      <dc:date>2019-05-29T09:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146772#M4754</link>
      <description>&lt;P&gt;Sorry, the second link is to the old v1 documentation. We're going to clean that up to redirect to the right place.&lt;/P&gt;
&lt;P&gt;So the first header (`Dropbox-API-Select-Team-Member`) should be right.&lt;/P&gt;
&lt;P&gt;This line looks fairly wrong. Is that just a typo when you copied it here?&lt;/P&gt;
&lt;PRE&gt;requests.post(url + headers=headers, data=f)&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Nov 2015 06:53:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146772#M4754</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-11-07T06:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146773#M4755</link>
      <description>&lt;P&gt;Sorry, yes it is a typo, it should be:&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp; &amp;nbsp; r = requests.post(url, headers=headers, data=f)&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Nov 2015 07:30:06 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146773#M4755</guid>
      <dc:creator>Jamal B.1</dc:creator>
      <dc:date>2015-11-07T07:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146774#M4756</link>
      <description>&lt;P&gt;I still get the error. Also with any API call on v2. Any idea of what I should change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2015 07:47:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146774#M4756</guid>
      <dc:creator>Jamal B.1</dc:creator>
      <dc:date>2015-11-07T07:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146775#M4757</link>
      <description>&lt;P&gt;It looks like this is a bug on our side. We're looking into it.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2015 09:00:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146775#M4757</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-11-07T09:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146776#M4758</link>
      <description>&lt;P&gt;Apologies, the documentation is wrong. We'll get that fixed up. The header should be "Dropbox-API-Select-User". Please try that and let us know if you still see any issues.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2015 02:54:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146776#M4758</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-11-08T02:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Business API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146777#M4759</link>
      <description>&lt;P&gt;It seems to work fine now &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;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2015 05:20:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Business-API-v2/m-p/146777#M4759</guid>
      <dc:creator>Jamal B.1</dc:creator>
      <dc:date>2015-11-08T05:20:22Z</dc:date>
    </item>
  </channel>
</rss>

