Jesus / dropbox_api

Ruby client library for Dropbox API v2
MIT License
171 stars 113 forks source link

HTTP 400: Error in call to API function #38

Closed FrankKair closed 6 years ago

FrankKair commented 6 years ago

I'm using this gem to get a link to a folder in my Dropbox, but when I perform the following operation, I get an error.

link = @client.get_temporary_link(item_path)

Here's the error.

/Users/Frank/.gems/gems/dropbox_api-0.1.10/lib/dropbox_api/endpoints/base.rb:36:in `process_response': HTTP 400: Error in call to API function "files/get_temporary_link": request body: path: 'None' expected to be a string, got null (DropboxApi::Errors::HttpError)
    from /Users/Frank/.gems/gems/dropbox_api-0.1.10/lib/dropbox_api/endpoints/base.rb:11:in `perform_request'
    from /Users/Frank/.gems/gems/dropbox_api-0.1.10/lib/dropbox_api/endpoints/files/get_temporary_link.rb:14:in `block in <class:GetTemporaryLink>'
    from /Users/Frank/.gems/gems/dropbox_api-0.1.10/lib/dropbox_api/cli

The same happened with other functions, such as create_shared_link_with_settings. What am I missing?

FrankKair commented 6 years ago

I just realized I was using a reference out of scope to call these methods. I'm gonna close the issue. The API is working perfectly!