title: 403 Response code - Request Blocked when using Cowin setu APIs
body: <p>I was just trying to make covid vaccine alert using Cowin Setu API (India) in nodejs. But I am facing some strange thing, whenever I hit get request I got 403 response code from cloudfront says 'Request Blocked' but the same is working from postman as well as from browser. Please help me in this</p>
  <p>Getting this error:-</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;HTML&gt;&lt;HEAD&gt;&lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"&gt;
  &lt;TITLE&gt;ERROR: The request could not be satisfied&lt;/TITLE&gt;
  &lt;/HEAD&gt;&lt;BODY&gt;
  &lt;H1&gt;403 ERROR&lt;/H1&gt;
  &lt;H2&gt;The request could not be satisfied.&lt;/H2&gt;
  &lt;HR noshade size="1px"&gt;
  Request blocked.
  We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
  &lt;BR clear="all"&gt;
  If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
  &lt;BR clear="all"&gt;
  &lt;HR noshade size="1px"&gt;
  &lt;PRE&gt;
  Generated by cloudfront (CloudFront)
  Request ID: Q1RZ94qgFp6AjUUKE4e9urMB85VejcqMbaJO6Y8Xq5Qp4kNjDBre9A==
  &lt;/PRE&gt;
  &lt;ADDRESS&gt;
  &lt;/ADDRESS&gt;
  &lt;/BODY&gt;&lt;/HTML&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Here's my nodejs code:</p>
  <pre><code>var express = require(&quot;express&quot;);
  var app = express();
  var bodyParser = require(&quot;body-parser&quot;);
  const axios = require(&quot;axios&quot;);
  const { Telegram } = require(&quot;telegraf&quot;);
  const fetch = require(&quot;node-fetch&quot;);
  var cors = require('cors');
  var request=require('request');
  
  
  const tg = new Telegram(process.env.BOT_TOKEN);
  const bot = new Telegram(process.env.BOT_TOKEN, {
  polling: true
  });
  
  //bot.start((ctx) =&gt; ctx.reply('Welcom to Covid Vaccine Finder'))
  
  /*bot.hears(&quot;about&quot;, ctx =&gt; {
  ctx.reply(&quot;Hey, I am CoviBot!&quot;);
  });
  bot.launch();*/
  
  app.use(bodyParser.json());
  
  app.use(cors());
  
  
  
  app.use(
  bodyParser.urlencoded({
  extended: true
  })
  );
  
  app.get(&quot;/&quot;, function(req, res) {
  res.send(&quot;Welcom to Covid Vaccine Finder&quot;);
  });
  
  app.get(&quot;/test&quot;, function(req, res, next) {
  var d = new Date();
  var options = {
  year: &quot;numeric&quot;,
  month: &quot;2-digit&quot;,
  day: &quot;2-digit&quot;
  };
  
  var date = String(d.toLocaleDateString(&quot;en&quot;, options));
  date = date.replace(/\//g, &quot;-&quot;);
  console.log(date);
  
  const URL =
  &quot;https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/findByPinpincode=110088&amp;date=13-05-2021&quot;;
  
  var options = { 
  url: URL,
  method: 'GET',
  headers: {
    'Accept-Encoding': 'gzip, deflate',
      'Accept-Language': 'en-GB,en;q=0.8,en-US;q=0.6,hu;q=0.4',
      'Cache-Control': 'max-age=0',
      Connection: 'keep-alive',
      Host: 'cdn-api.co-vin.in',
      'User-Agent': 'request',
  
  
   }
   };
   request(options,function(err,res,body){
    let json = body;
   console.log(json);
   });
  
  
  const txt = &quot;Finding vaccine centres for you....&quot;;
  //tg.sendMessage(process.env.GROUP_ID, txt);
  res.send(txt);
  
  
  });
  
  
  
   // Finally, start our server
   app.listen(process.env.PORT, function() {
   console.log(&quot;Covid app listening on port 3000!&quot;);
   });
  </code></pre>
  <p><strong>I hope this problem will solve</strong></p>
  <p><strong>Thanks</strong></p>