Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
ABDUL Salam
3 years agoExplorer | Level 3
I am getting invalid_url again and again with /save_url, https://api.dropboxapi.com/2/files/save_url
Hi, I have an app that uses https://api.dropboxapi.com/2/files/save_url/save_url endpoint to save urls from my ecommerce store to my dropbox. It was working fine early on locally bu as soon as I ha...
ABDUL Salam
3 years agoExplorer | Level 3
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
$payload= [
"path" => "myPathHere",
"url" => "https://abc.com/"
]
and then json encoded that in curl and it worked, but it's not working with dynamic url's
such as
$payload= [
"path" => "myPathHere",
"url" => $url, //my dynamic URL comes here
]
still figuring it out on my side why it's happening.
ABDUL Salam
3 years agoExplorer | Level 3
payload:{"path":"/2023/November/#1135/GOLF-P-WE-AU-BLACK/#1135_GOLF-P-WE-AU-BLACK.eps","url":"https://cdn.customily.com/ExportFile/pf-dev-3/cfa42d7e-4418-47af-b120-83e9ca35b1c1.eps"}
uploaded customily orders to dropbox: {".tag": "async_job_id", "async_job_id": "ruN7OyTfOucAAAAAAAAAAQ"} 200
payload:{"path":"/2023/November/#1134/GOLF-P-WE-AU-BLACK/#1134_GOLF-P-WE-AU-BLACK.eps","url":"https://cdn.customily.com/ExportFile/pf-dev-3/a4da1953-2618-4e17-8f60-4c81e776f0a0.eps"}
uploaded customily orders to dropbox: {".tag": "async_job_id", "async_job_id": "Tz3sCHoe4-EAAAAAAAAAAQ"} 200
these are logs of my cron job
and against these async_job_id's I am getting
although my URL in body seem valid
these are logs of my cron job
and against these async_job_id's I am getting
{
".tag": "failed",
"failed": {
".tag": "invalid_url"
}
}
- Здравко3 years agoLegendary | Level 20
ABDUL Salam, 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.
Good luck.
- ABDUL Salam3 years agoExplorer | Level 3
Здравко It was a typo mistake (second case) I have fixed it.
- Здравко3 years agoLegendary | Level 20
Hm..🤔 I just checked it and everything seems valid. In first case I received:
{ ".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" }Of course, It appears as expected:
The same when talking for the second case (after your typo correction):
{ ".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" }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 https://api.dropboxapi.com with http://XXX.XXX.XXX.XXX:8080). 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).
Good luck.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!