dropbox / dbxcli

A command line client for Dropbox built using the Go SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't oauth2 Authorise the app

ke-ss opened this issue · comments

commented

I'm using

  • arch linux v5.8.1-arch1-1
  • bash v5.017
  • google chrome v84.0.4147.125 (Official Build) (64-bit)
  • dropbox v104.4.175

I have installed dbxcli from the AUR with
aur/dbxcli 3.0.0-1 (+6 0.00) (Installed)

This seems to be the latest v3.0.0-1 version of dbxcli.

Here's the problem.
At first use, after install, I log in on my dropbox web page, as suggested for the process of initial oauth2 authorisation,
then at the bash command prompt I type
`dbxcli get
I get a prompt back with the following oauth2 web link
https://www.dropbox.com/1/oauth2/authorize?client_id=&response_type=code&state=state
which also asks me to "Enter the authorization code here:"
Presumably the web page link is supposed to provide an access code which is entered at the prompt.

I click the link and it takes me to a dropbox page which shows this error:
Error (400)
It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.
More details for developers
Invalid client_id: "".`

Is there a fix?

commented

I got it working by following instructions to compile.

For Arch users this can be solved by setting your app's credentials during package build

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=dbxcli#n16

As example, installing it through yay

env PERSONALAPPKEY=[key] PERSONALAPPSECRET=[secret] yay -y dbxcli

By building it this way, running dbxcli account and going through the OAuth flow will work


It's also worthwhile to check if your app has the "Files and folders" permissions enabled in the App Console.