You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
H. Reo
10 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'
- Leah C.1New member | Level 1
Since you're using Swift 2.0, what does your Podfile for your project look like?
- H. ReoNew 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.1New 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.New member | Level 1
Could you please let us now in here, when the bug is fixed? Thanks so far for the great api!
- Greg-DBDropbox Staff
Will do!
- Henk Martijn L.New 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-DBDropbox Staff
Sorry, no update quite yet. It should be relatively soon though.
- Greg-DBDropbox Staff
This should be fixed in the latest release. Let us know if you're still seeing any issues.
- Henk Martijn L.New member | Level 1
Solved the problem, thanks!
- Michael K.57New 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.5,919 PostsLatest Activity: 13 hours ago
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 or Facebook.
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!