Simple Application to support uploads to box.com

谁说我不能喝 提交于 2019-12-25 02:17:05

问题


I am trying to create a simple box.com application that will support folder creation and file uploads from our application to box.com for use by multiple box.com users.

I have a couple of questions:

  1. For testing, I create a new application and specified that I did not want it to be public (while we develop it). But I can't add it to my test user account because I can't find it - so how can I test it? How do I add it to my end user box.com account?

  2. The idea is to have the box.com user enter their credentials or key or something in our software so that we can automate the uploading of files and creation of folders within their accounts. But everything I read talks about getting a ticket and redirecting the user to a login page. We need to automate this process so we can upload files/create folders without the box.com users present. How is this done?


回答1:


Box.com always requires auth_tokens to make a API calls.

Hence you have to first get API key from your user and generate auth_tokens from that API key and save it. Combination of users 'API key' and 'auth tokens' will be required to make API calls.

Note: auth_tokens currently do not expire.

Have a look at the box api Documentation , to generate auth tokens. For developing your private application, you can skip step 2 and 3, as you will have user's API key.




回答2:


You should be able to find your own app by navigating to it's name in the URL. For example Box's FTP "app" description is at https://cloud.box.com/services/box_ftp_server.

As far as the process you have to go through to authenticate your users against their Box account, Box uses a pretty standard OAuth type process, where you setup a redirect URL, and send your user to a Box site to authenticate. After the user authenticates, Box will redirect back to you. That keeps the transaction safe for the user, so they're not giving you their Box login credentials. FaceBook, Google, etc. all do pretty much the same thing.



来源:https://stackoverflow.com/questions/13575657/simple-application-to-support-uploads-to-box-com

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!