DropboxApi::Errors::HttpError Exception: HTTP 400: Error in call to API function "files/list_folder": Invalid authorization value in HTTP header "Authorization": "Bearer access_token=\"#<OAuth2::AccessToken:0x00007f72ce27efc8>\", on_token_refreshed=\"#<Proc:0x00007f72cdf7d6d0@(byebug):3 (lambda)>\"". Expecting "Bearer <oauth2-access-token>".
and it doesnt refresh the token and doesnt save it.
and even if i dont send the on_token_refresh the error will be :
DropboxApi::Errors::HttpError Exception: HTTP 400: Error in call to API function "files/list_folder": The given OAuth 2 access token is malformed.
looks like the DropboxApi::Client module is not accepting those correctly.
it'd be amazing if someone could help me thanks
the problem was that Faraday gem which is a dependency of the dropbox_api was not getting updated correctly by bundle install so i did bundle update dropbox_api and it fixed it
i try to make the client exactly as explained inside the docs like this:
access_token = OAuth2::AccessToken.from_hash(authenticator, token_hash)
the Dropbox::Token::Save is just a module that saves the token
the problem is the client gives me this error:
DropboxApi::Errors::HttpError Exception: HTTP 400: Error in call to API function "files/list_folder": Invalid authorization value in HTTP header "Authorization": "Bearer access_token=\"#<OAuth2::AccessToken:0x00007f72ce27efc8>\", on_token_refreshed=\"#<Proc:0x00007f72cdf7d6d0@(byebug):3 (lambda)>\"". Expecting "Bearer <oauth2-access-token>".
and it doesnt refresh the token and doesnt save it.and even if i dont send the on_token_refresh the error will be :
DropboxApi::Errors::HttpError Exception: HTTP 400: Error in call to API function "files/list_folder": The given OAuth 2 access token is malformed.
looks like the DropboxApi::Client module is not accepting those correctly. it'd be amazing if someone could help me thanks