Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
H. Reo
11 years agoNew member | Level 1
SwiftyDropbox API Error
Hello!
I'm trying out SwiftyDropbox
I can get user's name (with usersGetCurrentAccount() )
but I can't get user's filesList(with filesListFolder(path: ""))
error message is 'Bad Input: Error in call to API function "files/list_folder": request body: could not decode input as JSON'
environment
Xcode7
Swift2.0
SwiftyDropbox branch 'swift-2.0'
18 Replies
Replies have been turned off for this discussion
- Leah C.111 years agoNew member | Level 1
Since you're using Swift 2.0, what does your Podfile for your project look like?
- H. Reo11 years agoNew member | Level 1
this is my Podfile for my project
platform :ios, '8.0'
use_frameworks!
target 'MY-PROJECT' do
pod 'SwiftyDropbox', :git => 'git@github.com:dropbox/SwiftyDropbox.git', :branch => 'swift-2.0'
end - Leah C.111 years agoNew member | Level 1
I've verified that this is a bug in SwiftyDropbox and we're working on a fix. Sorry about that. Thanks so much for letting us know about it!
- Henk Martijn L.11 years agoNew member | Level 1
Could you please let us now in here, when the bug is fixed? Thanks so far for the great api!
- Greg-DB11 years ago
Dropbox Community Moderator
Will do!
- Henk Martijn L.11 years agoNew member | Level 1
Hey!
Is there any status update about the fix? Since this is where I have all my logic build on to sync between the device and dropbox. So I can't really use it at the moment!
Downgrading osx is also to much of a hassle :) - Greg-DB11 years ago
Dropbox Community Moderator
Sorry, no update quite yet. It should be relatively soon though.
- Greg-DB11 years ago
Dropbox Community Moderator
This should be fixed in the latest release. Let us know if you're still seeing any issues.
- Henk Martijn L.11 years agoNew member | Level 1
Solved the problem, thanks!
- Michael K.5710 years agoNew member | Level 1
UPDATE:
I applied the fix that was suggested in "#48" by Leshkoapps and it solved the problem. I'm not sure why the version that I installed via cocoapods didn't include this change, but I'm a bit of a noob to cocoapods and programming in general, so it was likely a user mistake, but in case someone else makes the same one...
Hi,
I'm getting this error as well, using nothing more than the sample code in the tutorial to get up and running. It does seem to be writing and reading the "hello.txt" file, but I get this:
*** Get current account ***
[request-id 2d1753ef779bb8bb8631124239e00f4e] Bad Input: Error in call to API function "users/get_current_account": request body: could not decode input as JSON
*** List folder ***
[request-id 4a7934fec1ed93d70f3f049913ee9280] Bad Input: Error in call to API function "files/list_folder": request body: could not decode input as JSON
*** Upload file ****
Uploaded file name: hello.txt
Uploaded file revision: 242d57873
*** Get file metadata ***
[request-id 82d1fb27eee8bccceb2f749b46b614b0] Bad Input: Error in call to API function "files/get_metadata": request body: could not decode input as JSON
*** Download file ***
Downloaded file name: hello.txt
Downloaded file url: file:///var/mobile/Containers/Data/Application/68429947-9A4F-4C67-89A0-EE5CCBB02BC7/Documents/C1E5D3F0-2A11-499D-A98D-9F3EACCE69FA-download.txt
Downloaded file data: Optional(<48656c6c 6f21>)
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!