title: Is there anyway to bypass discord's suspicious activity screen when joining a server via python?
body: <p>I am currently writing a script in Python that allows you to join a discord server using the invite code and the authorization token of the account you wish to join with.</p>
  <p>Here is the code:</p>
  <pre class="lang-py prettyprint-override"><code>link = f&quot;https://discordapp.com/api/v6/invite/{self.invite}?with_counts=true&quot;
  header = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36', 'Authorization': token}
  
  if not self.using_proxies:
      join = requests.post(link, headers=header)
  else:
      random_proxy = get_random_proxy()  # Returns random proxy from a list.
      try:
          auth = HTTPProxyDigestAuth(random_proxy[1][0], random_proxy[1][1])  # user/pass
          join = requests.post(link, proxies=random_proxy[0], auth=auth, headers=header)
      except KeyError:  # If there is no random_proxy[1], then do not try to authenticate user/pass
          join = requests.post(link, proxies=random_proxy, headers=header)  # if no user/pass needed
  </code></pre>
  <p>This code results in discord's suspicious activity, phone verification screen after just joining one server with one token, with or without proxies.</p>
  <p>I am currently wondering if it is indeed possible to bypass being detected, somehow. I've tried other User-Agents and including other headers; did not work. Surely there has to be some method to the madness and, if there is it, I ask if anyone knows.</p>
  <p>Thanks!</p>
  <p><strong>Edit(s)</strong>:</p>
  <p>I should point out that the code does work as intended, in regards to actually getting the account to join the server.</p>
  <p>I should also point out that the code is planned to be for open-source, public use - so using extremely, account specific headers may not work <em>if</em> there is no way for the end-user of this supposed program to deal with them.</p>