title: "Http 401 Unauthorized" when login through webdriver running browser
body: <p>In the concern website, (<a href="https://zoom.us/signin" rel="nofollow noreferrer">https://zoom.us/signin</a>) when I login in manually through browser, opened with geckodriver webdriver :</p>
  <pre><code>browser = webdriver.Firefox() #(Just an example, real code at the end of the answer)
  </code></pre>
  <p>It first prompts for captcha (which isn't asked for when login through normal browser on same website). Please note that I entered the link manually too. Then, after solving the captcha, it gives me the following error :</p>
  <pre><code>error: Http 401 Unauthorized
  </code></pre>
  <p>And I couldn't login at all, even though I did everything manually, which points out that it is somehow detecting that I'm using webdrive (please note that I'm NOT using headless Firefox).</p>
  <p>Now, regarding my findings:</p>
  <p>I used inspect element and tried to find what triggers when I click the sign in button.</p>
  <p>and, functions from only two files are trigger :</p>
  <p><code>login.min.js</code>, and <code>all.min.js</code></p>
  <p>I fetched the login.min.js and arranged it in readable form, here it is <a href="https://pastebin.com/SMFt1stC" rel="nofollow noreferrer">https://pastebin.com/SMFt1stC</a></p>
  <p>all.min.js is mix of common library, here's the link:
  <a href="https://st1.zoom.us/static/5.1.1662/js/all.min.js" rel="nofollow noreferrer">https://st1.zoom.us/static/5.1.1662/js/all.min.js</a></p>
  <p>One of the function on <code>login.min.js</code> that gets triggered on clicking sign in is this :</p>
  <pre><code>var c = $(&quot;#login-form&quot;);
  .....
  .....
      l.on(&quot;click&quot;, function() {
              c.find(&quot;span.help-block&quot;).remove();
              c.find(&quot;div.has-error&quot;).removeClass(&quot;has-error&quot;);
              var t = c.valid();
              if (!t) {
                  c.find(&quot;div.has-error input&quot;).length &amp;&amp; c.find(&quot;div.has-error input&quot;).eq(0).trigger(&quot;focus&quot;);
                  return
              }
              if (signinNeedCaptcha &amp;&amp; newCaptcha.isReCaptcha) {
                  l.disableBtn();
                  window.setTimeout(function() { l.enableBtn() }, 3000);
                  newCaptcha.executeReCaptcha(s, n)
              } else {
                  c.trigger(&quot;submit&quot;)
              }
  </code></pre>
  <p>From here, I can clearly see what gets trigger after I click sign in.</p>
  <p>I entered it in console manually, that did a HTTP POST request, and it returned with same &quot;Http 401 Unauthorized&quot; error, which made me think what exactly is making it fail.</p>
  <p>In short, I want to know how exactly the site finds out that I'm using webdrive, so that I can mitigate it.</p>
  <p>To find this out, will I have to read every single JavaScript in the webpage myself to actually figure it out, or am I missing something obvious, or it isn't possible to figure out how they might be detecting browser as the code that might be doing it is in the backend? I'm new to web development so can't really figure that out.</p>
  <p>This is how I'm starting the webdriver through Python Selenium:
  <a href="https://pastebin.com/Aey09mCu" rel="nofollow noreferrer">https://pastebin.com/Aey09mCu</a></p>