Authentication from desktop app

2019-05-18 16:12发布

问题:

I'm building a windows service that would upload files to Box.com under some conditions. How can I authenticate without having the user go to a webpage and enter the username and password ?

I can't seem to find the details in the documentation.

thanks.

回答1:

At the moment, you have two options.

  1. You can sign up for the 'instant mode' beta that gets you an authentication token via the /tokens V2 API endpoint, but limits you to accessing a single folder in the user's account.
  2. You can use the V1 authentication APIs. If your app is a company internal app, then we have a V1 authentication API that we can enable for you to do direct logins. However, direct logins are less secure, and generally discouraged.