<?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: /add_folder_member suddenly gets a 400 response in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622758#M28772</link>
    <description>&lt;P&gt;Thank you so much. That was it. I was focusing so much on this api call that I totally missed that the variable providing the shared folder ID was passing along an extra " symbol where it shouldn't.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 16:31:04 GMT</pubDate>
    <dc:creator>Leon_NAM</dc:creator>
    <dc:date>2022-09-15T16:31:04Z</dc:date>
    <item>
      <title>/add_folder_member suddenly gets a 400 response</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622504#M28755</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an automation where I...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a shared folder (inherited access)&lt;/P&gt;
&lt;P&gt;2. Check if this folder was created successfully&lt;/P&gt;
&lt;P&gt;3. Create a shared subfolder to the first folder which is shared with nobody (no_inherit)&lt;/P&gt;
&lt;P&gt;4. Check if that folder was created successfully&lt;/P&gt;
&lt;P&gt;5. Add the appropriate member groups to the subfolder&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This used to work fine until a few months back when I noticed that step 5 had a 400 response: "&lt;SPAN&gt;Error in call to API function "sharing/add_folder_member": request body: could not decode input as JSON". Since then I couldn't get it to work anymore. The rest of the steps works as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is my /add_folder_member api call input (I'm using make.com by the way):&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;[
    {
        "ca": null,
        "qs": [],
        "url": "https://api.dropboxapi.com/2/sharing/add_folder_member",
        "data": "{\"custom_message\": \"Documentation for launch day\",\"members\": [{\"member\": {\".tag\": \"dropbox_id\",\"dropbox_id\": \"g:092309be814897100000000000004ac1\"},\"access_level\": \"editor\"},{\"member\":{\".tag\": \"dropbox_id\",\"dropbox_id\": \"g:092309be814897100000000000003ab1\"},\"access_level\": \"editor\"}],\"quiet\": true,\"shared_folder_id\": \"3021562177\"\"}",
        "gzip": false,
        "method": "post",
        "headers": [
            {
                "name": "Dropbox-API-Select-Admin",
                "value": "xxx"
            }
        ],
        "timeout": null,
        "useMtls": false,
        "bodyType": "raw",
        "contentType": "application/json",
        "serializeUrl": false,
        "shareCookies": false,
        "parseResponse": false,
        "followRedirect": false,
        "useQuerystring": false,
        "rejectUnauthorized": false
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can anybody help?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Leon&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:45:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622504#M28755</guid>
      <dc:creator>Leon_NAM</dc:creator>
      <dc:date>2022-09-16T10:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: /add_folder_member suddenly gets a 400 response</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622725#M28769</link>
      <description>&lt;P&gt;The "request body: could not decode input as JSON" error should indicate that the value you're sending in the request body couldn't be successfully parsed as JSON.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, that should be the value you have in the "data" field. Looking at that value, it seems the issue is that you have an extra \" at the end in \"\". That should just be a single \", to close the shared_folder_id field value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, we recommend using some JSON library to build these strings whenever possible, as that will help avoid issues like that.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 14:43:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622725#M28769</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-09-15T14:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: /add_folder_member suddenly gets a 400 response</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622758#M28772</link>
      <description>&lt;P&gt;Thank you so much. That was it. I was focusing so much on this api call that I totally missed that the variable providing the shared folder ID was passing along an extra " symbol where it shouldn't.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:31:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/add-folder-member-suddenly-gets-a-400-response/m-p/622758#M28772</guid>
      <dc:creator>Leon_NAM</dc:creator>
      <dc:date>2022-09-15T16:31:04Z</dc:date>
    </item>
  </channel>
</rss>

