Skip to main content
Question

The API returned an error code: 502

  • May 21, 2025
  • 2 replies
  • 12 views

Forum|alt.badge.img

HI,

 

The API returned an error code: 502

 

I get this message when I'm trying to write a file to a folder. The credentials are correct. Is there any documentation for this error code.

 

Thanks,

Priya

2 replies

Forum|alt.badge.img

I am also facing the same issue. When box integration and ran code locally it works fine. When the same code is deployed to the server the application throws error as

"502 - Web server received an invalid response while acting as a gateway or proxy server.There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server."

 

This is using Box 2.0 SDK in .Net core web application. Can any one help me out how to resolve this issue.


Forum|alt.badge.img

I am also facing the same issue. When box integration and ran code locally it works fine. When the same code is deployed to the server the application fails sometimes but not all the time.

I am using box-node-sdk npm for implementing script with server-side authentication.