Can't upload file from Apex
Hello. I'm developing integration between box.com and Salesforce. I need to send request from apex class to upload a files from custom component. I have created custom app in developer console and named credential in Saleforce for connect to it and get access token via Auth2.0. I can search folders right now, and preflight check for upload sends its ok, but I can't upload file. Scope is root_readwrite. I can upload file when I manually set access token from postman collection created from docs. I use BoxApiConnection apex class for it. But I want named credential do all the staff. Can you help? I'm receiving Script-thrown exception in apex when I send request to https://upload.box.com/api/2.0/ via named credential
Please sign in to leave a comment.
Comments
2 comments