Skip to main content
Question

Unable to Upload file

  • May 22, 2025
  • 2 replies
  • 40 views

Forum|alt.badge.img

im getting below message while uploading file from my angular5 web application running on url http://localhost:4200

  1. HttpErrorResponse {headers: HttpHeaders, status: 403, statusText: "Forbidden", url: "https://upload.box.com/api/2.0/files/content", ok: false, …}
    1. error:
      1. code: "cors_origin_not_whitelisted"
      2. context_info: {origin: "https://gecustomer-portal-uiversionfinal-nov3-harshanew.run.aws-usw02-pr.ice.predix.io"}
      3. help_url: "http://developers.box.com/docs/#errors"
      4. message: "Access denied - Did you forget to whitelist your origin in the CORS config of your app?"
      5. headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
      6. message: "Http failure response for https://upload.box.com/api/2.0/files/content: 403 Forbidden"
      7. name: "HttpErrorResponse"
      8. ok: false
      9. status: 403Could you please help me to solve this issue

2 replies

Forum|alt.badge.img

Have you tried adding your domain to the list of CORS domains configured for your app?

 

If you go to https://cloud.app.box.com/developers/console/app//configuration you should see the CORS domains configuration towards the bottom of the page:

 

BOX_7hqat9zgiwvgyqm0xajpqksibtudyy68.png


Forum|alt.badge.img

thank you. Cors error isnot coming .but still i'm getting forbidden error for the file upload link

Error-Http failure response for https://upload.box.com/api/2.0/files/content: 403 Forbidden