title: Why am I getting '502 status error' while making a HTTP request to REST API?
body: <p>I am trying to fetch some data from a REST API, I have properly specified the parameters and even my access token is valid yet I am not getting back the expected response, I am making the following HTTP request :</p>
  <pre class="lang-php prettyprint-override"><code>//set parameters
  $paramRequest = array(
  &quot;title&quot; =&gt; &quot;Sample Daily meeting&quot;,
  &quot;agenda&quot; =&gt; &quot;Sample Agenda&quot;,
  &quot;password&quot; =&gt; &quot;BgJep@43&quot;,
  &quot;start&quot; =&gt; &quot;2020-07-01 15:00:00&quot;,
  &quot;end&quot; =&gt; &quot;2020-07-01 16:00:00&quot;,
  &quot;timezone&quot; =&gt; &quot;Asia/Shanghai&quot;,
  &quot;recurrence&quot; =&gt; &quot;FREQ=DAILY;INTERVAL=1;COUNT=10&quot;,
  &quot;enabledAutoRecordMeeting&quot; =&gt; false,
  &quot;allowAnyUserToBeCoHost&quot; =&gt; false,
  );
  
  $cURLConnection = curl_init(&quot;https://webexapis.com/v1/meetings&quot;);
  curl_setopt($cURLConnection, CURLOPT_POSTFIELDS, $paramRequest);
  curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, array(
                                              'Content-Type: application/x-www-form-urlencoded',
                                              'Connection: Keep-Alive',
                                              'Authorization: Bearer ' . $token 
                                              ));
  //send HTTP POST request
  $apiResponse = curl_exec($cURLConnection);
  curl_close($cURLConnection);
  
  // $apiResponse - available data from the API request
  $jsonArrayResponse = json_decode($apiResponse);
  
  //display response
  print_r($jsonArrayResponse);
  </code></pre>
  <p>I am receiving the following response from the API:</p>
  <pre class="lang-php prettyprint-override"><code>stdClass Object ( [message] =&gt; The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. [errors] =&gt; Array ( [0] =&gt; stdClass Object ( [description] =&gt; The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. ) ) [trackingId] =&gt; ROUTER_5EFC3CCD-C466-01BB-0100-AC12DED20100 ) 
  </code></pre>