Box content picker for users files
I am trying to create an app which a user can upload a file from their box account. It looks like this is possible but I can't seem to find the correct tools (or combination of tools).
I would like:
1. Have user sign in. I'm assuming this would be something like "[My App] want's to access your files, sign in.. ".
2. Once the user signs in, use that access token (or obtain token with some access code), to give them a nice Box Content Picker of THEIR files, so they can upload one.
What would be the correct API/SDK/UI tools to do this?
Thanks
-
Hi there - the best option would be to use the Box Content Picker (currently in beta), which is part of the Box UI Kit. This will allow you to authenticate a user using OAuth 2.0 and allow them to access their files using pre-built UI from Box. The Box UI Kit component is fully integrated with our APIs, so implementation should be simple!
-
You will have to take a look at https://developer.box.com/docs/authentication for a brief overview and https://developer.box.com/v2.0/reference#token for the API to get tokens
followed by https://developer.box.com/docs/box-content-picker#section-authentication for content picker scopes.
As a very simple, rough, not-production-ready and only for quick demo purposes you can look at https://github.com/box/box-ui-elements-demo/blob/master/src/Login.js which uses the standard OAuth approach (the other being JWT) for managed users.
-
Sorry for the delay, I had given up hope on a response..
I appreciate the response. I will take a look.
I do have a process which has the following.
User clicks button to sign in to box.- They are redirected to box (https://www.dropbox.com/1/oauth2/authorize?client_id=[my-app])
- The code is provided in the redirect (back to my site) after the user logs in and 'accepts'.
- I send the code off for an access token request.- Once I get the access token I can create a new instance of dropbox.
However, that instance is for the content in MY application (assuming because of "client_id=[my-app]" in oauth request).My goal is to have my site access the users content after they allow "my-app" to access it.
I still don't see anything in the content picker for that.
Anyways, thanks again for the response and I'll take another look in case I missed something.
-Kyle
-
Hey Kyle, your comment refers to Dropbox several times and this is the developer forum for Box, a different company 🙂
Are you using our content picker from this site (https://developer.box.com/docs/box-content-picker), which is the one we offer, or the one for selecting files from Dropbox?
Please sign in to leave a comment.
Comments
5 comments