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
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.<tokenhere>
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"}
this is what I got after running netcat on my local machine and redirecting queries to my local system.
Greg-DB
Dropbox Community Moderator
3 years agoABDUL Salam 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?
- ABDUL Salam3 years agoExplorer | Level 3
The issue arises when I execute my script as a cron task on my hosting platform. This script performs the following tasks:
- Retrieves orders from an ecommerce store.
- Processes the received data to refine its format.
- Searches for a specific URL attribute within each order and stores it in an array if found.
- 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.
- 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.
- 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.
- Здравко3 years agoLegendary | Level 20
ABDUL Salam wrote:... Interestingly, the same URL functions correctly when hardcoded in /save_url request parameter.
Do it in the same way when the request fails, not like when succeeds!
- ABDUL Salam3 years agoExplorer | Level 3
Greg-DB Is there any way we can check what URL/OR params were passed to the job so that from its async_job_id we can see it in response? This currently generically gives a failed tag with invalid_url.
https://api.dropboxapi.com/2/files/save_url/check_job_status{".tag": "failed","failed": {".tag": "invalid_url"}} - Greg-DB3 years ago
Dropbox Community Moderator
ABDUL Salam The Dropbox API does not offer a way to echo back the parameters/URL sent to /2/files/save_url.
As Здравко asked though, were you inspecting this in the actual environment where this is failing?
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!