<?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: save_url throws error &amp;quot;request body: could not decode input as JSON&amp;quot; in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661426#M30034</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;"Error in call to API function "files/save_url": request body: could not decode input as JSON"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;main part of the script attached below&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;--------------------------------------------------------&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;...&lt;BR /&gt;let postOptions = {&lt;BR /&gt;method: "POST",&lt;BR /&gt;headers: {&lt;BR /&gt;"Authorization" : "Bearer " + appToken,&lt;BR /&gt;"Content-Type" : "&lt;FONT color="#008000"&gt;&lt;U&gt;&lt;STRONG&gt;application/json&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;"&lt;BR /&gt;},&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;U&gt;data&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;: {&lt;BR /&gt;"path":"/myairsri/best_peacock.jpg",&lt;BR /&gt;"url":"&amp;lt;-- Airtable attachmet URL --&amp;gt;"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;const postResults = await fetch(dropboxEndpoint, postOptions);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You have correctly set json type for the request payload, but where you're ensuring passed data in the body is correct JSON format? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; Maybe passing something like processed body with 'JSON.stringify' can solve your issue. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;By the way, you can use &lt;A title="Dropbox SDK for Javascript" href="https://github.com/dropbox/dropbox-sdk-js/" target="_blank" rel="noopener"&gt;Dropbox SDK for Javascript&lt;/A&gt; to do the same.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2023 13:44:41 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-02-20T13:44:41Z</dc:date>
    <item>
      <title>save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661395#M30028</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I am trying to upload files (pictures with .jpg extension) to my dropbox account (to a specific app folder). I am using Airtable scripting (Javascript) extension to upload files from Airtable&amp;nbsp; (which has these pictures as attachments)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;As these attachments are in Airtable (available at individual URLs), I am using below dropbox URL&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;"&lt;A href="https://api.dropboxapi.com/2/files/save_url" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/save_url&lt;/A&gt;"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;When I use Dropbox API explorer it is able save the file to the dropbox folder.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;But when I use through Airtable scripting block I am getting below error,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;"Error in call to API function "files/save_url": request body: could not decode input as JSON"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;main part of the script attached below&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;--------------------------------------------------------&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;// set the endpoint and app token&lt;BR /&gt;let dropboxEndpoint = "&lt;A href="https://api.dropboxapi.com/2/files/save_url" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/save_url&lt;/A&gt;";&lt;BR /&gt;let appToken = "&amp;lt;--my dropbox app token --&amp;gt;"&lt;BR /&gt;// set up the post options&lt;BR /&gt;let postOptions = {&lt;BR /&gt;method: "POST",&lt;BR /&gt;headers: {&lt;BR /&gt;"Authorization" : "Bearer " + appToken,&lt;BR /&gt;"Content-Type" : "application/json"&lt;BR /&gt;},&lt;BR /&gt;data: {&lt;BR /&gt;"path":"/myairsri/best_peacock.jpg",&lt;BR /&gt;"url":"&amp;lt;-- Airtable attachmet URL --&amp;gt;"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;const postResults = await fetch(dropboxEndpoint, postOptions);&lt;BR /&gt;const jsonPost = await postResults.text();&lt;BR /&gt;console.log(jsonPost)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;----------------------------------------------------&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Please suggest how this can be resolved. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Sr&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Feb 2023 11:34:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661395#M30028</guid>
      <dc:creator>sr_c</dc:creator>
      <dc:date>2023-02-20T11:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661426#M30034</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;"Error in call to API function "files/save_url": request body: could not decode input as JSON"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;main part of the script attached below&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;--------------------------------------------------------&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;...&lt;BR /&gt;let postOptions = {&lt;BR /&gt;method: "POST",&lt;BR /&gt;headers: {&lt;BR /&gt;"Authorization" : "Bearer " + appToken,&lt;BR /&gt;"Content-Type" : "&lt;FONT color="#008000"&gt;&lt;U&gt;&lt;STRONG&gt;application/json&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;"&lt;BR /&gt;},&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;U&gt;data&lt;/U&gt;&lt;/STRONG&gt;&lt;/FONT&gt;: {&lt;BR /&gt;"path":"/myairsri/best_peacock.jpg",&lt;BR /&gt;"url":"&amp;lt;-- Airtable attachmet URL --&amp;gt;"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;const postResults = await fetch(dropboxEndpoint, postOptions);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You have correctly set json type for the request payload, but where you're ensuring passed data in the body is correct JSON format? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; Maybe passing something like processed body with 'JSON.stringify' can solve your issue. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;By the way, you can use &lt;A title="Dropbox SDK for Javascript" href="https://github.com/dropbox/dropbox-sdk-js/" target="_blank" rel="noopener"&gt;Dropbox SDK for Javascript&lt;/A&gt; to do the same.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 13:44:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661426#M30034</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-02-20T13:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661651#M30042</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt; As Здравко said, you'll need to make sure you're sending a JSON string. It doesn't look like you're doing so in your current code. We do recommend using &lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;the official Dropbox JavaScript SDK&lt;/A&gt; though, as it will do much of the work for you.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 23:29:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/661651#M30042</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-02-20T23:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664382#M30103</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Based on the suggestion to use JSON.stringify, I tried to implement below solution but error remains same. Not sure whether this is the right way to implement the suggestion. Changes highlighted in blue&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; dropboxEndpoint &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;A href="https://api.dropboxapi.com/2/files/save_url" target="_blank"&gt;https://api.dropboxapi.com/2/files/save_url&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; appToken &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&amp;lt;&amp;lt;App Token&amp;gt;&amp;gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; fileobj &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "path"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"/myairsri/best_peacock.jpg"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"url"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;urlval&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; filedata &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;JSON&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;stringify&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;fileobj&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// set up the post options&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; postOptions &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;method&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"POST"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Authorization"&lt;/SPAN&gt; &lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Bearer "&lt;/SPAN&gt; &lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt; appToken&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Content-Type"&lt;/SPAN&gt; &lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"application/json"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; filedata&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please let me know your suggestions&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Mar 2023 17:21:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664382#M30103</guid>
      <dc:creator>sr_c</dc:creator>
      <dc:date>2023-03-01T17:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664386#M30104</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; filedata&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt;, When you are preparing a request body with appropriate data, you have to set those data. What actually is going on here? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; You have already prepared request body (that you named as 'filedata' - incorrect name and probably confusing)! In this context instead of setting 'data', you have to set 'body'. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; Be more careful!&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 17:43:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664386#M30104</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-03-01T17:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664389#M30105</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1623718"&gt;@sr_c&lt;/a&gt; I see you're using fetch to perform the call, so make sure you're using the right options to construct the call as needed. As Здравко said, &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/fetch" target="_blank"&gt;fetch expects&lt;/A&gt; a parameter named 'body' to set the request body, not 'data'.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 17:47:03 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664389#M30105</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-03-01T17:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664413#M30108</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790" target="_self"&gt;&lt;SPAN class=""&gt;Здравко&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Your suggestion worked like a charm and I am able to upload files. Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;But I am wondering why Dropbox API documentation is showing 'data' instead of 'body' in the 'Example' (screen shot attached below)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dropbox_save_url.png" style="width: 800px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/35747iB03E49315D1ADCA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="dropbox_save_url.png" alt="dropbox_save_url.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 19:00:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664413#M30108</guid>
      <dc:creator>sr_c</dc:creator>
      <dc:date>2023-03-01T19:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: save_url throws error "request body: could not decode input as JSON"</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664575#M30111</link>
      <description>&lt;P&gt;The example on the page, you posted, uses 'curl' shell command. That's the way (one of all actually) body to be represented. You're working with 'fetch' command in javascript, not shell! Just different things! &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; Pay attention on the proper documentation. None of these parameters (how they are named) can be seen by Dropbox server - just properly formated request is expected.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 10:27:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/save-url-throws-error-quot-request-body-could-not-decode-input/m-p/664575#M30111</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-03-02T10:27:13Z</dc:date>
    </item>
  </channel>
</rss>

