Api connection
AnsweredI am creating a test app for our department. I was trying
BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);
However I found that if I use this I am unable to download/upload/rename/delete folder/files. What is the proper way of creating an api connection that allows for full functionality?
-
Official comment
Hello Vinoth,
What happens when you try to make a call to download/upload/rename/delete folder/files? Is there an error message you can share?
Best,
Kourtney
Comment actions -
The error code for when I attempt to use BoxFile.getInfo() method.
com.box.sdk.BoxAPIResponseException: The API returned an error code [404 | yl6navgjxfsndo9b.093f3435836b37f7a41644acd4b0a45cf] not_found - Not Found
The API returned an error code [404 | yl6navgjxfsndo9b.093f3435836b37f7a41644acd4b0a45cf] not_found - Not Found -
You're using a JWT app, which means by default your token is associated with the applications service account. Just like within Box.com directly, you can only interact with content the user associated with your token either owns or has collaborator access to. The 404 indicates that your service account. does not have access to the file you're trying to get information about here. Therefore, you'll either need to add the service account as a collaborator OR get a token associated with someone who already has access to the file. Hope that helps!
Please sign in to leave a comment.
Comments
4 comments