<?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 move files in Powershell gives Error 404 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-move-files-in-Powershell-gives-Error-404/m-p/722851#M31938</link>
    <description>&lt;P&gt;Good day all, I am new to dropbox development and am trying to do something simple, post a file to one directory (done) and then have another script move that file to another directory after downloading it.&amp;nbsp; I am just working on the move piece and keep getting a 404 error and nothing seems to work.&amp;nbsp; And the file.contents.write properties have been set as well.&amp;nbsp; If I simply do a file upload to the second folder, that works, but not a move.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$authorization = "Bearer $AccessToken"&lt;/P&gt;&lt;P&gt;# move file to other folder&lt;/P&gt;&lt;P&gt;$arg = '{"allow_ownership_transfer":false,"allow_shared_folder":false,"autorename":false,"from_path":"/incoming","to_path":"/completed"}"'&lt;/P&gt;&lt;P&gt;$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;BR /&gt;$headers.Add("Authorization", $authorization)&lt;BR /&gt;$headers.Add("Content-Type", 'application/json')&lt;BR /&gt;$headers.Add("Dropbox-API-Arg", $arg)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Invoke-RestMethod `&lt;BR /&gt;-Uri &lt;A href="https://api.dropboxapi.com/2/files/move_v2" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/move_v2&lt;/A&gt; `&lt;BR /&gt;-Headers $headers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 12:33:28 GMT</pubDate>
    <dc:creator>zencop731</dc:creator>
    <dc:date>2023-10-19T12:33:28Z</dc:date>
    <item>
      <title>Trying to move files in Powershell gives Error 404</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-move-files-in-Powershell-gives-Error-404/m-p/722851#M31938</link>
      <description>&lt;P&gt;Good day all, I am new to dropbox development and am trying to do something simple, post a file to one directory (done) and then have another script move that file to another directory after downloading it.&amp;nbsp; I am just working on the move piece and keep getting a 404 error and nothing seems to work.&amp;nbsp; And the file.contents.write properties have been set as well.&amp;nbsp; If I simply do a file upload to the second folder, that works, but not a move.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$authorization = "Bearer $AccessToken"&lt;/P&gt;&lt;P&gt;# move file to other folder&lt;/P&gt;&lt;P&gt;$arg = '{"allow_ownership_transfer":false,"allow_shared_folder":false,"autorename":false,"from_path":"/incoming","to_path":"/completed"}"'&lt;/P&gt;&lt;P&gt;$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;BR /&gt;$headers.Add("Authorization", $authorization)&lt;BR /&gt;$headers.Add("Content-Type", 'application/json')&lt;BR /&gt;$headers.Add("Dropbox-API-Arg", $arg)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Invoke-RestMethod `&lt;BR /&gt;-Uri &lt;A href="https://api.dropboxapi.com/2/files/move_v2" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/move_v2&lt;/A&gt; `&lt;BR /&gt;-Headers $headers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 12:33:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-move-files-in-Powershell-gives-Error-404/m-p/722851#M31938</guid>
      <dc:creator>zencop731</dc:creator>
      <dc:date>2023-10-19T12:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to move files in Powershell gives Error 404</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-move-files-in-Powershell-gives-Error-404/m-p/722887#M31940</link>
      <description>&lt;P&gt;Make sure you set the HTTP method to "POST". You don't have that specified so it looks like the client is defaulting to a value not valid for accessing this Dropbox API endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-move" target="_blank"&gt;the /2/files/move_v2 endpoint&lt;/A&gt; is an "RPC" &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#formats" target="_blank"&gt;style endpoint&lt;/A&gt;, so it requires the parameters in the request body, not the "Dropbox-API-Arg" request header.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, it looks like you have an extra quote character at the end of your arg string.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 14:17:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Trying-to-move-files-in-Powershell-gives-Error-404/m-p/722887#M31940</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-10-19T14:17:53Z</dc:date>
    </item>
  </channel>
</rss>

