Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Nikita I.1
10 years agoNew member | Level 1
Getting 400 HTTP error for /list_folder/longpoll
The request for longpoll used to be working fine, but a couple of days ago I started getting 400 HTTP error with the following message:
"Error in call to API function "files/list_folder/longpoll": request body: cursor: unsupported cursor type"
I'm using HTTP API, the cursor is supplied as a result of list_folder request.
Is there a solution for that and what kind of error handling could you recommend in case this happens?
Thanks!
10 Replies
Replies have been turned off for this discussion
- Nikita I.110 years agoNew member | Level 1
to clarify - I'm using app-specific permissions
- Greg-DB10 years ago
Dropbox Community Moderator
If you're getting this error from files/list_folder/longpoll when calling with an unmodified cursor returned from files/list_folder, that error would be unexpected and may be due to a bug on our side. To help us look into this:
- Are you modifying the cursor in any way?
- Is this reproducible using newly acquired cursors from files/list_folder?
- Can you share a sample request and response?
Thanks in advance!
- Nikita I.110 years agoNew member | Level 1
Hi Gregory, thanks for your reply
You're correct, I'm passing an unmodified cursor from files/list_folder to files/list_folder/longpoll. The problem is reproducible in API Explorer as well. Here's an example:
Request to list_folder:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \ --header 'Authorization: Bearer -----access_token----' \ --header 'Content-Type: application/json' \ --data '{"path":"}'
Response:
{ "entries": [ { ".tag": "file", "name": "firmware.bin", "path_lower": "/firmware.bin", "id": "id:nyCg-bFo0NAAAAAAAAAAAg", "client_modified": "2016-01-17T07:02:55Z", "server_modified": "2016-01-17T07:02:55Z", "rev": "143532a63", "size": 0 } ], "cursor": "1AAGLifVjyh-QzyQXWvWXfiDd1I6IWtxN0-mGryosrvCTqmwW6GMaF1F76R-vzk1UcTDJe6Pb4taPG6HPh0s8EUizyPkhXyb3pUZIUVAaua2aArHzt2mH4bsyrR_e3CGID0I", "has_more": false }
Request to /list_folder/longpoll:
curl -X POST https://notify.dropboxapi.com/2/files/list_folder/longpoll \ --header 'Content-Type: application/json' \ --data '{"cursor":"1AAGLifVjyh-QzyQXWvWXfiDd1I6IWtxN0-mGryosrvCTqmwW6GMaF1F76R-vzk1UcTDJe6Pb4taPG6HPh0s8EUizyPkhXyb3pUZIUVAaua2aArHzt2mH4bsyrR_e3CGID0I"}'
Response:
Error: 400
Error in call to API function "files/list_folder/longpoll": request body: cursor: unsupported cursor typeAs you can see, the cursor wasn't modified between calls, but we're still getting an error in response.
Regards, Nik
- Greg-DB10 years ago
Dropbox Community Moderator
Thanks for the additional information Nik! We're looking into it.
- Nikita I.110 years agoNew member | Level 1
Thx Gregory, greatly appreciated!
- Cagdas C.10 years agoNew member | Level 1
Long polling stopped working for me, too.
- Greg-DB10 years ago
Dropbox Community Moderator
This should be resolved now. Please let us know if you're still seeing any issues.
- Kestas K.10 years agoNew member | Level 1
Updated SwiftyDropbox to version 3.0.0 and I am getting the same error.
It seems that if you set includeMediaInfo to true, you will get this error. - Greg-DB10 years ago
Dropbox Community Moderator
Thanks for the report Kestas! We're looking into it.
- Greg-DB10 years ago
Dropbox Community Moderator
Hi Kestas, unfortunately /list_folder/longpoll doesn't currently support cursors for include_media_info=true, but I've opened this as a feature request. We'll update the documentation to clarify this.
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!