<?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: Bad HTTP &amp;quot;Content-Type&amp;quot; header from the Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/571313#M26698</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1508030"&gt;@VijayKumar E&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;SPAN&gt; So why should I set the content-type as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack" for the request ? &lt;/SPAN&gt;....&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You shouldn't set anything, actually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1508030"&gt;@VijayKumar E&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I tried the API by passing the content-type as empty string ( Content-Type : “” ) it’s working fine. &lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Great!&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@994EEA5C10EE66675FFD5E4032FE58C0/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt; Seems you have found it. Maybe that's the way in your environment to disable content-type header sending together with empty query body. 🤷&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2022 12:25:19 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2022-01-18T12:25:19Z</dc:date>
    <item>
      <title>Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569720#M26657</link>
      <description>&lt;P&gt;When I try a request to Dropbox API(v2), I am getting this error ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;"message"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Error in call to API function&amp;nbsp; "users/get_current_account": Bad HTTP "Content-Type\" header: "application/x-www-form-urlencoded". Expecting one of "application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am referring the following DropBox Documentation &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation" target="_self"&gt;link&lt;/A&gt;&amp;nbsp; and setting the Header as mentioned .&amp;nbsp; Can someone please&lt;/P&gt;
&lt;P&gt;help what is the reason for the issue ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting the above error message for the following APIs&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;/users/get_space_usage&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;users/get_current_account&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 00:05:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569720#M26657</guid>
      <dc:creator>VijayKumar E</dc:creator>
      <dc:date>2022-05-07T00:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569765#M26658</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1508030"&gt;@VijayKumar E&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The error message is descriptive enough, I think. For most API calls data are transferred in JSON form, not in urlencoded one. Seems you are trying to pass something in incorrect form. Even more, neither '/users/get_space_usage' nor '/users/get_current_account' require any parameters, so what are you actually trying to pass?! &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; In both cases authentication information would be enough. It's not an API call parameter, but independent header entry!&lt;/P&gt;&lt;P&gt;Try to post some code snippet reproducing the issue or raw HTTP headers for more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: May be useful try &lt;A title="Dropbox API Explorer • get_current_account" href="https://dropbox.github.io/dropbox-api-v2-explorer/#users_get_current_account" target="_blank" rel="noopener"&gt;Dropbox API Explorer for get_current_account&lt;/A&gt; (for example). Click 'Show Code' button and select 'HTTP request' to see what has to be. &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;</description>
      <pubDate>Tue, 11 Jan 2022 12:07:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569765#M26658</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-01-11T12:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569855#M26662</link>
      <description>&lt;P&gt;Здравко is correct, it looks like your code/client is just sending the wrong "Content-Type" request header, and these endpoints don't take any parameters, so that header isn't required anyway. You mentioned you are attempting to set the header correctly, but it's possible whatever HTTPS client you're using is overriding that. You may need to refer to the documentation for your client for information on configuring it accordingly. &lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 17:36:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/569855#M26662</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-01-11T17:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/571287#M26696</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the mentioned APIs '/users/get_space_usage' and '/users/get_current_account' I am not sending any data in the request. So why should I set the content-type as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack" for the request ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In both cases we are just passing the authentication information by referring DropBox Documentation .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By seeing the error message I tried the APIs by setting those content-type as application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack" but still it was not working . &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I tried the API by passing the content-type as empty string ( Content-Type : “” ) it’s working fine. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 10:39:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/571287#M26696</guid>
      <dc:creator>VijayKumar E</dc:creator>
      <dc:date>2022-01-18T10:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/571313#M26698</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1508030"&gt;@VijayKumar E&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;SPAN&gt; So why should I set the content-type as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;application/json", "application/json; charset=utf-8", "text/plain; charset=dropbox-cors-hack" for the request ? &lt;/SPAN&gt;....&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You shouldn't set anything, actually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1508030"&gt;@VijayKumar E&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I tried the API by passing the content-type as empty string ( Content-Type : “” ) it’s working fine. &lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Great!&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@994EEA5C10EE66675FFD5E4032FE58C0/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt; Seems you have found it. Maybe that's the way in your environment to disable content-type header sending together with empty query body. 🤷&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 12:25:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/571313#M26698</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-01-18T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bad HTTP "Content-Type" header from the Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/595686#M27687</link>
      <description>&lt;P&gt;Yes, for anyone reading this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are calling something that takes no parameters like:&amp;nbsp;&lt;A href="https://api.dropboxapi.com/2/users/get_current_account" target="_blank"&gt;https://api.dropboxapi.com/2/users/get_current_account&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you need to make sure either you:&lt;/P&gt;&lt;P&gt;1) Explicitly send NO Content-type header with your request so it is completely absent:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) If you have an underlying framework in your code making the call that puts in a default content header, you need to explicitly override it and send a blank one ala Content-type: ""&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2022 21:22:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Bad-HTTP-quot-Content-Type-quot-header-from-the-Dropbox-API/m-p/595686#M27687</guid>
      <dc:creator>humanclock</dc:creator>
      <dc:date>2022-05-06T21:22:30Z</dc:date>
    </item>
  </channel>
</rss>

