<?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: Can I use business app to access personal dropbox? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395987#M21765</link>
    <description>&lt;P&gt;My App only need to these 3 methods: get metadata,&amp;nbsp; create folder and upload file.&amp;nbsp; If my user try to get_metadata of a team folder, I got this error by non-Business access token:&lt;BR /&gt;&lt;BR /&gt;'Error in call to API function "files/get_metadata": Unexpected select user header. Your app does not have permission to use this feature'&lt;/P&gt;&lt;P&gt;Here is my code (Python):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dbx = Dropbox(access.access_token)
dbx_user = dbx.users_get_current_account()
  
team_member_id = dbx_user.team_member_id
team_root = PathRoot.namespace_id(dbx_user.root_info.root_namespace_id)

# set headers
dbx = Dropbox(access.access_token, headers={"Dropbox-API-Select-User": team_member_id, 'Dropbox-API-Path-Root': stone_serializers.json_encode(PathRoot_validator, team_root)})

# here throw that permission issue:
dbx.files_get_metadata(folder_id)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I use business token,&amp;nbsp; use similar code - replaceusers_get_current_account() by&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;dbx_team.team_token_get_authenticated_admin()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Then my app can use files_get_metadata() without issues.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 00:03:15 GMT</pubDate>
    <dc:creator>Steve_Neo</dc:creator>
    <dc:date>2020-02-11T00:03:15Z</dc:date>
    <item>
      <title>Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395663#M21756</link>
      <description>&lt;P&gt;We provider an integration to our customers to upload files created by system.&amp;nbsp; &amp;nbsp;It works well for personal account. Basically, the process is the customer use Dropbox File Brower pick a folder, and our system saves that folder and upload files.&amp;nbsp; However, I found this doesn't work if my customer is using Business Dropbox Account.&amp;nbsp; It looks I have to create a new Business API App to handle this.&lt;/P&gt;
&lt;P&gt;So my question is,&amp;nbsp; should I create 2 APP for same function?&amp;nbsp; &amp;nbsp;I want to make this transparent for my customers, is this possible?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use Python API, and use these functions currently:&lt;/P&gt;
&lt;PRE&gt;users_get_current_account()&lt;/PRE&gt;
&lt;PRE&gt;files_upload()&lt;/PRE&gt;
&lt;PRE&gt;files_get_metadata()&lt;/PRE&gt;
&lt;PRE&gt;files_create_folder_v2()&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 18:39:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395663#M21756</guid>
      <dc:creator>Steve_Neo</dc:creator>
      <dc:date>2020-02-10T18:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395729#M21758</link>
      <description>&lt;P&gt;Don't get answer yet. I made some progress and make the Business Account working with these methods.&amp;nbsp; However, it seems not possible to "tranparent" to end-user. Because Biz and Personal app token cannot be mixed&amp;nbsp;when the user is connecting by Oatuh2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That means, when the user connects the Dropbox,&amp;nbsp; I need to give them 2 options to ask if they want to login personal or business account.&amp;nbsp; Is that right?&amp;nbsp; Any possibility to use one app token?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 02:29:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395729#M21758</guid>
      <dc:creator>Steve_Neo</dc:creator>
      <dc:date>2020-02-10T02:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395918#M21764</link>
      <description>&lt;P&gt;Can you elaborate on what you meant when you said "this doesn't work if my customer is using Business Dropbox Account"?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should certainly be able to use the particular&amp;nbsp;methods you listed with both Business or non-Business accounts. You don't need to register separate apps in that case. A single "Dropbox API" app can be used for those&amp;nbsp;Dropbox API methods for any account type.&lt;/P&gt;
&lt;P&gt;(If you do need to support both Business and non-Business accounts, and also need to use both&amp;nbsp;Dropbox API methods, such as for file operations, and&amp;nbsp;Dropbox Business API methods, such as for team operations like listing team members, then you would need to register two separate apps.)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 18:44:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395918#M21764</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-02-10T18:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395987#M21765</link>
      <description>&lt;P&gt;My App only need to these 3 methods: get metadata,&amp;nbsp; create folder and upload file.&amp;nbsp; If my user try to get_metadata of a team folder, I got this error by non-Business access token:&lt;BR /&gt;&lt;BR /&gt;'Error in call to API function "files/get_metadata": Unexpected select user header. Your app does not have permission to use this feature'&lt;/P&gt;&lt;P&gt;Here is my code (Python):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dbx = Dropbox(access.access_token)
dbx_user = dbx.users_get_current_account()
  
team_member_id = dbx_user.team_member_id
team_root = PathRoot.namespace_id(dbx_user.root_info.root_namespace_id)

# set headers
dbx = Dropbox(access.access_token, headers={"Dropbox-API-Select-User": team_member_id, 'Dropbox-API-Path-Root': stone_serializers.json_encode(PathRoot_validator, team_root)})

# here throw that permission issue:
dbx.files_get_metadata(folder_id)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I use business token,&amp;nbsp; use similar code - replaceusers_get_current_account() by&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;dbx_team.team_token_get_authenticated_admin()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Then my app can use files_get_metadata() without issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 00:03:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395987#M21765</guid>
      <dc:creator>Steve_Neo</dc:creator>
      <dc:date>2020-02-11T00:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395988#M21766</link>
      <description>&lt;P&gt;So my question could be, can I use non-Business app token to upload file to team folder?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 00:04:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/395988#M21766</guid>
      <dc:creator>Steve_Neo</dc:creator>
      <dc:date>2020-02-11T00:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/396196#M21768</link>
      <description>&lt;P&gt;Yes, you can use an access token for a non-Business app to access Business accounts, including team folders.&lt;/P&gt;
&lt;P&gt;First, for reference, the "Unexpected select user header" error is expected if you attempt to set the "Dropbox-API-Select-User" header when using an&amp;nbsp;access token for a non-Business app, as that functionality is only needed for Business apps. You can remove that code and just use an&amp;nbsp;access token for a non-Business app.&lt;/P&gt;
&lt;P&gt;To access different parts of an account, you should use the "Dropbox-API-Path-Root" functionality as you've already begun to, as seen in your code. Note that you don't need to set this manually if you're using the Python SDK though. You can use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.with_path_root" target="_self"&gt;the&amp;nbsp;Dropbox.with_path_root method&lt;/A&gt; to set it instead.&lt;/P&gt;
&lt;P&gt;For information on how to list and access different parts of&amp;nbsp;Dropbox accounts, please review &lt;A href="https://www.dropbox.com/developers/reference/namespace-guide" target="_self"&gt;the Namespace Guide&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 16:31:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/396196#M21768</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-02-11T16:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use business app to access personal dropbox?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/396324#M21771</link>
      <description>&lt;P&gt;Yes, it works now. &amp;nbsp;I think the major issue is I set the wrong permission on non-Business app. It should be "fullaccess". &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I didn't use&amp;nbsp;&lt;A href="http://\" target="_self" rel="nofollow noreferrer"&gt;Dropbox.with_path_root method&lt;/A&gt;. &amp;nbsp;It is because it reset other HTTP headers, because I thought I should use both&amp;nbsp;&lt;SPAN&gt;Dropbox-API-Select-User and root_path. &amp;nbsp; Anyway, this is not important now. &amp;nbsp;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 22:25:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Can-I-use-business-app-to-access-personal-dropbox/m-p/396324#M21771</guid>
      <dc:creator>steveneo</dc:creator>
      <dc:date>2020-02-11T22:25:43Z</dc:date>
    </item>
  </channel>
</rss>

