Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

How to use auth token generated on Dropbox App Console #60

@sasa-friedrich-bitlab

Description

@sasa-friedrich-bitlab

I'm trying to use dropbox with generated access token from Dropbox App Console.

If I execute:

curl https://api.dropbox.com/1/account/info -H "Authorization:Bearer <MY-ACCESS-TOKEN>"

request successfully returns my account info.

How can I use this access_token with 'dropbox-api'?

I tried (in Rails console):

Dropbox::API::Config.app_key = 'my_app_key'
Dropbox::API::Config.app_secret = 'my_app_secret'
Dropbox::API::Config.mode = 'dropbox'
client = Dropbox::API::Client.new(token: 'my_generated_access_token')
client.account

...and get: "Dropbox::API::Error::Unauthorized: 401 - Bad or expired token"

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions