<?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: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732833#M32384</link>
    <description>&lt;P&gt;in curl, I passed the payload as a json_encoded body which adds these slashes, but I have also hardcoded an HTTPS URL in the payload as&amp;nbsp;&lt;BR /&gt;$payload= [&lt;/P&gt;&lt;P&gt;"path" =&amp;gt; "myPathHere",&lt;BR /&gt;"url" =&amp;gt; "&lt;A href="https://abc.com/" target="_blank"&gt;https://abc.com/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;and then json encoded that in curl and it worked, but it's not working with dynamic url's&amp;nbsp;&lt;BR /&gt;such as&lt;/P&gt;&lt;P&gt;$payload= [&lt;/P&gt;&lt;P&gt;"path" =&amp;gt; "myPathHere",&lt;BR /&gt;"url" =&amp;gt; $url, //my dynamic URL comes here&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;still figuring it out on my side why it's happening.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 06:28:39 GMT</pubDate>
    <dc:creator>ABDUL Salam</dc:creator>
    <dc:date>2023-11-28T06:28:39Z</dc:date>
    <item>
      <title>I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save_url</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732572#M32362</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have an app that uses &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;save_url&amp;nbsp; endpoint to save urls from my ecommerce store to my dropbox. It was working fine early on locally bu as soon as I have deployed my script and check the logs after execution then this endpoint returns me a async_job_id which I use to check job status from &lt;A href="https://api.dropboxapi.com/2/files/save_url/check_job_status" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com/2/files/save_url/check_job_status&lt;/A&gt;&amp;nbsp;and I get&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"invalid_url"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;this error as response again and again.&lt;BR /&gt;I am using PHP as development language and curl for making requests to /save_url endpoint.&lt;BR /&gt;Although I am sure my URL's are not invalid.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;function saveCustomilyOrders($dropboxURL, $accessToken, $customilyOrders)
{
    $apiURL = $dropboxURL . '/2/files/save_url';
    $headers = [
        'Authorization: Bearer ' . $accessToken,
        'Content-Type: application/json',
    ];
    foreach ($customilyOrders as $customilyOrder) {
        $path = $customilyOrder['path'];
        $url = $customilyOrder['url'];
        $payload = [
            'path' =&amp;gt; $path,
            'url' =&amp;gt; $url,
        ];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $apiURL);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);
        if ($httpCode == 200) {
//Do some logs
        } elseif ($httpCode != 200) {
            throw new Exception('something went wrong while saving customily orders to dropbox: ' . $httpCode . ' ' . $response);
        }
        sleep(5);
    }
}&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the snippet of function which I am using to /save_url enpoint.&lt;BR /&gt;Any suggestion in this issue will be highly appreciated as this is getting so much annyoying that it sometimes works and some times not and now its giving invalid_url again and again.&lt;BR /&gt;my json_encoded body looks like this in my curl request:&lt;BR /&gt;&lt;SPAN&gt;"{"path":"\/2023\/November\/#1123\/GP\/#1123_GK.eps","url":"https:\/\/cdn.customily.com\/ExportFile\/pf-dev-3\/b462fef1-aff5-42fa-aa77-f4eb0a6c7cce.eps"}"&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;if you can look into this.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 14:16:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732572#M32362</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-27T14:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732626#M32363</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You don't need to tag any slash! The backslashes you added make your link invalid (and not only - the next error would be that your path in invalid too). Trace where those data are coming from, in your code, and fix whatever needed.&lt;/P&gt;&lt;P&gt;By the way it's not a good practice to pass access token directly. Better build one 'opaque' structure holding all authentication data and pass that structure instead. You can get access token as result of dedicated function that get as param the same 'opaque' structure. Inside such a function you can trace whether access token is going to expire (let's say there are less that 5 or 3 mins) or already expired and if so perform a refresh. In such a way you won't need to do it in every API call (or another place), but instead in every API call, you will call to that function (that's responsible to all common things of authentication, including refresh whenever needed - there implement that &lt;A href="https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-APP-Authorization-Token-Expires/m-p/731019/highlight/true#M32321" target="_blank" rel="noopener"&gt;last step&lt;/A&gt; we talked about previous). &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;Also keep in mind that validity period is NOT something fixed! It's denoted in seconds when you receive access token and in spite typically 4 hours that's NOT something mandatory - can be less in some cases. Once you receive access token calculate expiration moment (based on current moment and validity period) and store that moment for future reference.&lt;/P&gt;&lt;P&gt;Hope this gives directions.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 14:33:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732626#M32363</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-27T14:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732629#M32364</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Firstly would like to appreciate your suggestion related to coding practices.&lt;BR /&gt;Basically,&amp;nbsp; this body with slashes is the output&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;json_encode($payload);&lt;/LI-CODE&gt;&lt;P&gt;that I have sent in my curl request.&lt;BR /&gt;Also, the main issue is if I manually run my script from the terminal locally using php script.php&lt;BR /&gt;It works perfectly with the same code.&lt;BR /&gt;But when I schedule it as a cron job on my server this script does not run as it runs locally, it does complete code flow and return me async_job_id in response but when I check using this async_job_id it always gives me this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
".tag": "failed",
"failed": {
".tag": "invalid_url"
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I wonder what could be the reason.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 14:52:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732629#M32364</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-27T14:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732664#M32375</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt; As Здравко said, the backslashes you have in the output you shared here are not expected or accepted in the URL, so make sure those aren't in the actual data you're sending to the API. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for why this works locally but not on your server, does your server have a different version of any libraries you're using? Or are you perhaps using a different URL value on the server?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 16:05:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732664#M32375</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-27T16:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732833#M32384</link>
      <description>&lt;P&gt;in curl, I passed the payload as a json_encoded body which adds these slashes, but I have also hardcoded an HTTPS URL in the payload as&amp;nbsp;&lt;BR /&gt;$payload= [&lt;/P&gt;&lt;P&gt;"path" =&amp;gt; "myPathHere",&lt;BR /&gt;"url" =&amp;gt; "&lt;A href="https://abc.com/" target="_blank"&gt;https://abc.com/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;and then json encoded that in curl and it worked, but it's not working with dynamic url's&amp;nbsp;&lt;BR /&gt;such as&lt;/P&gt;&lt;P&gt;$payload= [&lt;/P&gt;&lt;P&gt;"path" =&amp;gt; "myPathHere",&lt;BR /&gt;"url" =&amp;gt; $url, //my dynamic URL comes here&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;still figuring it out on my side why it's happening.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 06:28:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732833#M32384</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T06:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732851#M32385</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;payload:{&lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"/2023/November/#1135/GOLF-P-WE-AU-BLACK/#1135_GOLF-P-WE-AU-BLACK.eps"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"url"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://cdn.customily.com/ExportFile/pf-dev-3/cfa42d7e-4418-47af-b120-83e9ca35b1c1.eps" target="_blank" rel="noopener"&gt;https://cdn.customily.com/ExportFile/pf-dev-3/cfa42d7e-4418-47af-b120-83e9ca35b1c1.eps&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;uploaded customily orders to dropbox: {&lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"async_job_id"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"async_job_id"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"ruN7OyTfOucAAAAAAAAAAQ"&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;payload:{&lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"/2023/November/#1134/GOLF-P-WE-AU-BLACK/#1134_GOLF-P-WE-AU-BLACK.eps"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"url"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://cdn.customily.com/ExportFile/pf-dev-3/a4da1953-2618-4e17-8f60-4c81e776f0a0.eps" target="_blank" rel="noopener"&gt;https://cdn.customily.com/ExportFile/pf-dev-3/a4da1953-2618-4e17-8f60-4c81e776f0a0.eps&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;uploaded customily orders to dropbox: {&lt;/SPAN&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"async_job_id"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"async_job_id"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Tz3sCHoe4-EAAAAAAAAAAQ"&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;BR /&gt;&lt;/SPAN&gt;these are logs of my cron job&amp;nbsp;&lt;BR /&gt;and against these async_job_id's I am getting&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"invalid_url"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;although my URL in body seem valid&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Nov 2023 09:35:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732851#M32385</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T09:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732860#M32386</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt;, to be honest, I don't know why did you received exactly that error, but your path is definitely invalid (in the second case). In Dropbox whatever path you use must NOT end in slash and when we're talking for file path, it should include filename too - something missing in your case. Fix it.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 09:13:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732860#M32386</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-28T09:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732868#M32387</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;It was a typo mistake (second case) I have fixed it.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 09:34:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732868#M32387</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T09:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732896#M32389</link>
      <description>&lt;P&gt;Hm..&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; I just checked it and everything seems valid. In first case I received:&lt;/P&gt;&lt;PRE&gt;{
  ".tag": "complete",
  "name": "#1135_GOLF-P-WE-AU-BLACK.eps",
  "path_lower": "/2023/november/#1135/golf-p-we-au-black/#1135_golf-p-we-au-black.eps",
  "path_display": "/2023/November/#1135/GOLF-P-WE-AU-BLACK/#1135_GOLF-P-WE-AU-BLACK.eps",
  "id": "id:ElL7W-JPrdMAAAAAAABbFw",
  "client_modified": "2023-11-28T09:48:28Z",
  "server_modified": "2023-11-28T09:48:29Z",
  "rev": "60b335227a2e322ab554a",
  "size": 82890,
  "is_downloadable": true,
  "content_hash": "e84f56b1b7802b8cc4be23d765222a27b7286852f672a077c918f82b9cbae0e7"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Of course, It appears as expected:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="изображение.png" style="width: 333px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42401iFB871883DB5A5B90/image-size/large?v=v2&amp;amp;px=999" role="button" title="изображение.png" alt="изображение.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The same when talking for the second case (after your typo correction):&lt;/P&gt;&lt;PRE&gt;{
  ".tag": "complete",
  "name": "#1134_GOLF-P-WE-AU-BLACK.eps",
  "path_lower": "/2023/november/#1134/golf-p-we-au-black/#1134_golf-p-we-au-black.eps",
  "path_display": "/2023/November/#1134/GOLF-P-WE-AU-BLACK/#1134_GOLF-P-WE-AU-BLACK.eps",
  "id": "id:ElL7W-JPrdMAAAAAAABbEg",
  "client_modified": "2023-11-28T09:42:34Z",
  "server_modified": "2023-11-28T09:42:35Z",
  "rev": "60b333d0821f622ab554a",
  "size": 251734,
  "is_downloadable": true,
  "content_hash": "80b133e0c090344bf04204c78b396fac3ef591122cd343ffd1722b7db8c82ab0"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="изображение.png" style="width: 325px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/42411i426DD7A53B7AE171/image-size/large?v=v2&amp;amp;px=999" role="button" title="изображение.png" alt="изображение.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To be able see "what is actually going through the wire" you need to inspect the actual queries (not just your logs). It's easy using netcat runing on your local machine and directing your queries there (replacing &lt;SPAN&gt;&lt;A href="https://api.dropboxapi.com" target="_blank" rel="noopener"&gt;https://api.dropboxapi.com&lt;/A&gt;&lt;/SPAN&gt; with &lt;SPAN&gt;&lt;A href="https://XXX.XXX.XXX.XXX:8080" target="_blank" rel="noopener"&gt;http://XXX.XXX.XXX.XXX:8080&lt;/A&gt;&lt;/SPAN&gt;). Here "XXX.XXX.XXX.XXX" is you public IP address and 8080 appropriate port to listen on. I suppose you know how to redirect such a query. In such a way you can see exactly what's going out of your code and what's wrong (not just supposings).&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 10:13:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732896#M32389</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-28T10:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732921#M32390</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt; Like Здравко, I just tried this using the values you provided and it also worked without issue for me. If you're still seeing this issue, please check the exact values you're sending as they mentioned, and if there's an issue on the Dropbox API side, share a sample we can use to reproduce it. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 12:45:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732921#M32390</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-28T12:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732925#M32392</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790"&gt;@Здравко&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Listening on 0.0.0.0 8080
Connection received on DN-12 57
POST /2/files/save_url HTTP/1.1
Host: MY_IP:8080
Accept: */*
Authorization: Bearer sl.&amp;lt;tokenhere&amp;gt;
Content-Type: application/json
Content-Length: 174

{"path":"/2023/November/#1138/GOLF-P-WE-AU-BLACK/#1138_GOLF-P-WE-AU-BLACK.eps","url":"https://cdn.customily.com/ExportFile/pf-dev-3/a79b3bc0-80a1-4e48-aae7-eab0edd4b54d.eps"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is what I got after running netcat on my local machine and redirecting queries to my local system.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:02:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732925#M32392</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T13:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732928#M32393</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt; Thanks for sharing that. I just tried plugging in those exact values, and the file saved successfully for me. Are you still seeing this issue if you try those exact values?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:05:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732928#M32393</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-28T13:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732935#M32394</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;The issue arises when I execute my script as a cron task on my hosting platform. This script performs the following tasks:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Retrieves orders from an ecommerce store.&lt;/LI&gt;&lt;LI&gt;Processes the received data to refine its format.&lt;/LI&gt;&lt;LI&gt;Searches for a specific URL attribute within each order and stores it in an array if found.&lt;/LI&gt;&lt;LI&gt;Subsequently, it initiates a call to the Dropbox API to acquire an access_token. This token is obtained using a previously stored refresh token. Following this, it invokes the '/save_url' endpoint.&lt;/LI&gt;&lt;LI&gt;All operational information is logged in a dedicated file, signifying the successful completion of each step. However, upon calling the '/save_url' endpoint, an 'async_job_id' is returned.&lt;/LI&gt;&lt;LI&gt;Using this 'async_job_id' for verification purposes consistently results in an 'invalid URL' error. Interestingly, the same URL functions correctly when hardcoded in /save_url request parameter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:17:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732935#M32394</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T13:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732936#M32395</link>
      <description>&lt;P&gt;The same like in Greg's experiment, everything works as expected.&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/1748177"&gt;@ABDUL Salam&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;... It was working fine early on locally bu as soon as I have deployed my script and check the logs after execution then this endpoint returns me a async_job_id which I use to check job status from &lt;A href="https://api.dropboxapi.com/2/files/save_url/check_job_status" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api.dropboxapi.com/2/files/save_url/check_job_status&lt;/A&gt;&amp;nbsp;and I get ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt;, In this context, do you redirect your call from local machine or from the place where you are trying to deploy your script (where it fails actually)? If you do it locally only,... &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:17:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732936#M32395</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-28T13:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732939#M32396</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt;&amp;nbsp;wrote:&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;... Interestingly, the same URL functions correctly when hardcoded in /save_url request parameter.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do it in the same way when the request fails, not like when succeeds!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:23:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732939#M32396</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-11-28T13:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732987#M32398</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;Is there any way we can check what URL/OR params were passed to the job so that from its&amp;nbsp; async_job_id we can see it in response? This currently generically gives a failed tag with invalid_url.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&lt;A href="https://api.dropboxapi.com/2/files/save_url/check_job_status" target="_blank"&gt;https://api.dropboxapi.com/2/files/save_url/check_job_status&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"failed"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;".tag"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"invalid_url"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:17:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732987#M32398</guid>
      <dc:creator>ABDUL Salam</dc:creator>
      <dc:date>2023-11-28T15:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732992#M32399</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1748177"&gt;@ABDUL Salam&lt;/a&gt; The Dropbox API does not offer a way to echo back the parameters/URL sent to /2/files/save_url.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As Здравко asked though, were you inspecting this in the actual environment where this is failing?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 15:41:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-am-getting-invalid-url-again-and-again-with-save-url-https-api/m-p/732992#M32399</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-28T15:41:54Z</dc:date>
    </item>
  </channel>
</rss>

