title: WebRequest receive The remote server returned an error: (403) Forbidden
body: <p>When I visit this URL in the Chrome Browser, it works and I can see a string there:
  <a href="https://cex.io/api/ticker/BTC/USD" rel="nofollow noreferrer">https://cex.io/api/ticker/BTC/USD</a></p>
  
  <p>However, when I try to request the above URL using the below code. I do receive this error message:
  <strong>The remote server returned an error: (403) Forbidden</strong></p>
  
  <p>I wonder what could be wrong with the code or if I need to add or change something to return the string as we do in the chrome browser?</p>
  
  <pre><code>public void request()
  {
      String responseBody = "";
      String requestString = "https://cex.io/api/ticker/BTC/USD";
  
      try
      {
          //Make the request
          var request = (HttpWebRequest)WebRequest.Create(requestString);
  
          request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
          request.Timeout = 15000;
          request.Method = "GET"; //GET, POST
          request.Accept = "application/json";
          request.ContentType = "application/json; charset=utf-8";
  
          using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
          {
              var stream = response.GetResponseStream();
              using (var reader = new StreamReader(stream))
              {
                  try
                  {
                      responseBody = reader.ReadToEnd();
                      reader.Close();
                  }
                  catch { }
              }
              response.Close();
              response.Dispose();
              responseBody = responseBody.ToLower();
          }
      }
      catch (WebException ex)
      {
          //Show Error
          MessageBox.Show(ex.ToString());
      }
      MessageBox.Show(responseBody);
  }
  </code></pre>