<?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 Trying to add group to the Team Folder using API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/215352#M11073</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a team folder and adding groups to it using API, Creating a team folder works fine, Then for adding groups to the folder, I could not find any API to do that. Can you please provide link to API if there is any?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:23:52 GMT</pubDate>
    <dc:creator>Anusha</dc:creator>
    <dc:date>2019-05-29T09:23:52Z</dc:date>
    <item>
      <title>Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/215352#M11073</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a team folder and adding groups to it using API, Creating a team folder works fine, Then for adding groups to the folder, I could not find any API to do that. Can you please provide link to API if there is any?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:23:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/215352#M11073</guid>
      <dc:creator>Anusha</dc:creator>
      <dc:date>2019-05-29T09:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/215436#M11089</link>
      <description>&lt;P&gt;Hi Anusha, to add a group to a shared or team folder, you should use the&amp;nbsp;/2/sharing/add_folder_member endpoint:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#sharing-add_folder_member" target="_blank"&gt;https://www.dropbox.com/developers/documentation/http/documentation#sharing-add_folder_member&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Click through AddMember and MemberSelector to see more information on specifying the group via a group ID.)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 18:45:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/215436#M11089</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-04-10T18:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330627#M19306</link>
      <description>&lt;P&gt;I can't get this to work - I've tried everything to add a group to a team folder.&amp;nbsp; I've looked at other APIs and this is the only one that seems close to doing it.&lt;/P&gt;&lt;P&gt;The AddMember selector mentions only the tags '&lt;SPAN&gt;dropbox_id' and 'email'.&amp;nbsp; These are user selectors and not group selectors.&amp;nbsp; In the web gui, you aren't even allowed to add users to team folders - it must be a group.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried just passing a group_id tagged as 'group_id' but I get a 400:Bad Request error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also tried passing a group_id tagged as a 'dropbox_id' but it didn't work either.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;$body_req = '{ "shared_folder_id": "4211433992", "members": [ { "member": {".tag": "group_id", "group_id": "g:22f456bfb335a64b000000000009f29e" }, "access_level": { ".tag": "editor"} }]}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 01:49:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330627#M19306</guid>
      <dc:creator>jason_nyc</dc:creator>
      <dc:date>2019-02-25T01:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330747#M19320</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1004679"&gt;@jason_nyc&lt;/a&gt;&amp;nbsp;Using the group ID as a "dropbox_id" is the right way to add a group to a folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of what that would look like:&lt;/P&gt;
&lt;PRE&gt;curl -X POST https://api.dropboxapi.com/2/sharing/add_folder_member \
    --header "Authorization: Bearer &amp;lt;TEAM_MEMBER_FILES_ACCESS_ACCESS_TOKEN&amp;gt;" \
    --header "Dropbox-API-Select-Admin: &amp;lt;ADMIN_MEMBER_ID&amp;gt;" \
    --header "Content-Type: application/json" \
    --data "{\"shared_folder_id\": \"&amp;lt;TEAM_FOLDER_ID&amp;gt;\",\"members\": [{\"member\": {\".tag\": \"dropbox_id\",\"dropbox_id\": \"g:53cf341b5cb2e387000000000000425a\"}}]}"&lt;/PRE&gt;
&lt;P&gt;Can you elaborate on what you mean when you say it didn't work? Please share the full code and output if something isn't working as expected. Make sure you check the response body for an error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 16:56:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330747#M19320</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-02-25T16:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330815#M19331</link>
      <description>&lt;PRE&gt;Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer K3eIF3qUz8xxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

{
    "shared_folder_id": "4968278384",
    "members": [
        {
            "member": {
                ".tag": "dropbox_id",
                "dropbox_id": "g:22f456bfb225a64b000000000009f325"
            }
        }
    ]
}&lt;/PRE&gt;&lt;P&gt;tried this from the api&amp;nbsp;explorer and get this&lt;/P&gt;&lt;PRE&gt;	
{
  "error_summary": "access_error/not_a_member/...",
  "error": {
    ".tag": "access_error",
    "access_error": {
      ".tag": "not_a_member"
    }
  },
  "user_message": {
    "locale": "en",
    "text": "You aren’t a member of this shared folder."
  }
}&lt;/PRE&gt;&lt;P&gt;I'm trying to do this as a Team admin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this in powershell&amp;nbsp;i get&lt;/P&gt;&lt;PRE&gt;$Token = 'K3eIF3qUz8AAxxxxxxxxxxxxxxx'
$uri='https://api.dropboxapi.com/2/sharing/add_folder_member'
$body_req='{"shared_folder_id": "4968278384", "members": [ { "member": {".tag": "dropbox_id", "dropbox_id": "g:22f456bfb225a64b000000000009f325" }}]}'
$res = Invoke-RestMethod -Uri $uri -Body $body_req -ContentType 'application/json' -Headers @{ Authorization = ("Bearer " + $Token) } -Method Post
Invoke-RestMethod : The remote server returned an error: (409) Conflict.
At line:1 char:8&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Feb 2019 21:21:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/330815#M19331</guid>
      <dc:creator>jason_nyc</dc:creator>
      <dc:date>2019-02-25T21:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to add group to the Team Folder using API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/331002#M19346</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1004679"&gt;@jason_nyc&lt;/a&gt;&amp;nbsp;Thanks for the code/output! I see you're trying to operate on a team folder using a user-linked "Dropbox API" app. To perform this operation, you'd need to use a "Dropbox Business API" with the 'team member file access' permission, &lt;A href="https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access" target="_self"&gt;using the "Dropbox-API-Select-Admin" header&lt;/A&gt;, like in my the example in my previous post.&lt;/P&gt;
&lt;P&gt;By the way, the two attempt you shared here are probably the same error. In the PowerShell attempt you don't seem to be printing the response body, but I expect it would contain the same error.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 19:25:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-add-group-to-the-Team-Folder-using-API/m-p/331002#M19346</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-02-26T19:25:01Z</dc:date>
    </item>
  </channel>
</rss>

