Description
- I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
- I have checked that the [API documentation][api-docs] doesn't solve my issue.
- I have searched the [Box Developer Forums][dev-forums] and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
- I have searched [Issues in this repo][github-repo] and my issue isn't already reported.
Description of the Issue
When I call the copyInfo method with a FileRequest object, the information from the template I've specified isn't copied, and the default template is used instead. I did some curl methods against the endpoint itself, and that appears to be working.
Steps to Reproduce
Here's some standalone code that will reproduce the error. Note that this follows the example provided at https://developer.box.com/reference/post-file-requests-id-copy/
import com.box.sdk.BoxAPIConnection;
import com.box.sdk.BoxCCGAPIConnection;
import com.box.sdk.BoxFileRequest;
public class TestFileRequestCopy {
public static void main(String[] args) {
BoxCCGAPIConnection api2 = BoxCCGAPIConnection.applicationServiceAccountConnection(
"<REDACTED>",
"<REDACTED>",
"<REDACTED>"
);
String accessToken = api2.getAccessToken();
BoxAPIConnection api = new BoxAPIConnection(accessToken);
// From https://aspca.app.box.com/filerequest/14529626019
BoxFileRequest fileRequest = new BoxFileRequest(api, "14529626019");
BoxFileRequest.Info fileRequestInfo = fileRequest.new Info();
fileRequestInfo.setDescription("Following documents are requested for your process");
fileRequestInfo.setIsDescriptionRequired(true);
fileRequestInfo.setStatus(BoxFileRequest.Status.ACTIVE);
// "315508186869" is ID of folder
fileRequestInfo = fileRequest.copyInfo(fileRequestInfo, "315508186869");
System.out.println(fileRequestInfo.getUrl().toString());
}
}
Expected Behavior
I expected the template to be copied.
Error Message, Including Stack Trace
There's no stack trace -- it just silently fails.
Screenshots
Versions Used
Java SDK: 23.0.2
Java: 23.0.2
[sdk-docs]: ./doc
[api-docs]: https://developer.box.com/docs
[dev-forums]: https://community.box.com/t5/Platform-and-Development-Forum/bd-p/DeveloperForum
[github-repo]: https://github.com/box/box-java-sdk/search?type=Issues