title: Instagram ?__a=1 query: Why do I get login page instead of JSON?
body: <p>Here is a sample url that returns JSON of the instagram user's data: <a href="https://www.instagram.com/therock/?__a=1" rel="nofollow noreferrer">https://www.instagram.com/therock/?__a=1</a></p>
  <p>And it returns JSON like this:</p>
  <pre><code>{
     &quot;logging_page_id&quot;:&quot;profilePage_232192182&quot;,
     &quot;show_suggested_profiles&quot;:true,
     &quot;show_follow_dialog&quot;:false,
     &quot;graphql&quot;:{
        &quot;user&quot;:{
           &quot;biography&quot;:&quot;founder&quot;,
           &quot;blocked_by_viewer&quot;:false,
           &quot;business_email&quot;:null,
           &quot;restricted_by_viewer&quot;:false,
           &quot;country_block&quot;:false,
           &quot;external_url&quot;:&quot;https://projectrock.online/7ad&quot;,
           &quot;external_url_linkshimmed&quot;:&quot;https://l.instagram.com/?u=https%3A%2F%2Fprojectrock.online%2F7ad&amp;e=ATMKh6M0eOgq-_jVoR3-xJ0Q2wwVSenYemMoYM0A0nWrW9Y5P7mDXX1dkk2dDLidhEuV1Wees7Z3teLJqp7vB2k&amp;s=1&quot;,
           &quot;edge_followed_by&quot;:{
              &quot;count&quot;:199139001
           },
           &quot;followed_by_viewer&quot;:false,
           &quot;edge_follow&quot;:{
              &quot;count&quot;:406
           },
           &quot;follows_viewer&quot;:false,
           &quot;full_name&quot;:&quot;therock&quot;,
           &quot;has_ar_effects&quot;:false
  </code></pre>
  <p>I am working on an ASP.NET Core API and have an endpoint that takes in instagram handle and parses the JSON. It works fine locally, but when I hit the same endpoint on the Azure-deployed API, I get the log in page instead:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot; class=&quot;no-js not-logged-in client-root&quot;&gt;
      &lt;head&gt;
          &lt;meta charset=&quot;utf-8&quot;&gt;
          &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
  
          &lt;title&gt;
  Login • Instagram
  &lt;/title&gt;
  
          
          &lt;meta name=&quot;robots&quot; content=&quot;noimageindex, noarchive&quot;&gt;
          &lt;meta name=&quot;apple-mobile-web-app-status-bar-style&quot; content=&quot;default&quot;&gt;
          &lt;meta name=&quot;mobile-web-app-capable&quot; content=&quot;yes&quot;&gt;
          &lt;meta name=&quot;theme-color&quot; content=&quot;#ffffff&quot;&gt;
          &lt;meta id=&quot;viewport&quot; name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover&quot;&gt;
          &lt;link rel=&quot;manifest&quot; href=&quot;/data/manifest.json&quot;&gt;
  </code></pre>
  <p>I tried by using a third party browser-as-service (PhantomJsCloud) but returns the same log in page. I thought it was the CORS policy, but fixing it didn't work, and also setting the cookie returned, but to no avail. I am really lost here, I'd be really thankful if anyone can point to why this is happening. Thank you!</p>