Good morning everybody,
I have been trying to do a PoC following the guide specified here: https://docs.box.com/docs/getting-started-with-new-box-view
A lot of questions arose, some of them I was able to answer myself but there are other things that I am not sure I have understood clearly or that I am not able to make it work.
So... the new type of Authentication method (APP Token) uses the Primary and Secondary Access token and using them I have been able to generate a File token with this piece of code:
MultipartBody requestWithBody = Unirest.post(oauth2_url)
.header("Accept-Encoding", "gzip")
.header("Accept-Charset", "utf-8")
.header("Content-Type", "application/x-www-form-urlencoded")
.field("subject_token", URLEncoder.encode(accessToken, "UTF-8"))
.field("subject_token_type", "urn:ietf:params:oauth:token-type:access_token")
.field("scope", URLEncoder.encode(scope, "UTF-8"))
.field("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange");
With that File Token (1!tTOtFtt0jcvU6hyuOW0s - deleted characters - rcYHypd1MgNA..) I then try to generate an embed link (404 error) or upload a document (403 error) and I only receive errors.
Also, if I try to specify a scope and a specific document existing in my repository it fails with a 404 error.
if(fileID != null)
requestWithBody.field("resource", "https://api.box.com/2.0/files/" + fileID);
I have the application authorized in the box admin console and it indicates that can upload, preview and delete documents.
But, if I open the information on the second info icon this is the message that appears:
What means data stored or transferred to the application?
I think I am missing some important details here.
I would appreciate any help on this. 🙂
Thank you