Skip to main content
Box Employee
May 22, 2025 7:56 AM UTC
Question

Access-Control-Allow-Origin

Hello Sir

 

Greetings of The Day

 

I wish to bring it your kind notice that Currently i am Integrating Salesforce to Box.com and I am facing a Issue regarding uploading a file .

 

Following Error I got:

 

"Access to XMLHttpRequest at 'https://upload.box.com/api/2.0/files/content?parent_id=0' from origin 'https://c.ap15.visual.force.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

 

Let me Know if You have any further queries on the same ,awaiting your response.

 

Thanks and Regards

Sanjay Kumar Prajapat

 

 

    3 replies

    Box Employee
    May 22, 2025 7:56 AM UTC

     please have a look at this page: 

     

    https://developer.box.com/guides/best-practices/cors/

     

    You will need to enable CORS for the domain you're working on.

    Translate
    Box Employee
    May 22, 2025 7:56 AM UTC

    Sir

     

    I have already did it,still i have got error

    Translate
    Box Employee
    May 22, 2025 7:56 AM UTC

    Ok great!

     

    If you are using the standard Box for Salesforce managed package integration, then you may need to add the domain(s) to Salesforce’s Remote Site Settings:
    https://help.salesforce.com/articleView?id=configuring_remoteproxy.htm

     

    For Communities and Lightning components in general, you need to add the domain(s) to CSP Trusted Sites:
    https://help.salesforce.com/articleView?id=csp_trusted_sites.htm 

    Translate