title: Log in website using Jsoup - Java
body: <p>I'm trying to log in using linkedin Jsoup , I've tried several ways but always run into the error 403, where I am going wrong?</p>
  
  <p><strong>Test One</strong></p>
  
  <pre><code> Connection.Response loginForm = Jsoup.connect("https://www.linkedin.com")
                          .method(Connection.Method.GET)
                          .execute();
  
                  Document document = Jsoup.connect("https://www.linkedin.com")
                          .data("login-email", "email")
                          .data("login-password", "password")
                          .cookies(loginForm.cookies())
                          .post();
  
                  System.out.println(document.body().html());
  
  //after you logged in go to this page
   Document pesquisa=Jsoup.connect("https://www.linkedin.com/vsearch/p?locationType=Y&amp;f_N=S%2CO&amp;f_G=br%3A6368&amp;f_I=137&amp;trk=vsrp_savedsearch").get();
  </code></pre>
  
  <p><strong>Erro Console</strong></p>
  
  <blockquote>
    <p>org.jsoup.HttpStatusException: HTTP error fetching URL. Status=403,
    URL=<a href="https://www.linkedin.com" rel="nofollow noreferrer">https://www.linkedin.com</a>  at
    org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:590)
      at
    org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:540)
      at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:227)
      at org.jsoup.helper.HttpConnection.post(HttpConnection.java:222)    at
    linkedin.page.main(page.java:27)</p>
  </blockquote>
  
  <p><strong>Html Page</strong></p>
  
  <pre><code>&lt;form class="login-form" action="https://www.linkedin.com/uas/login-submit" method="POST" data-autologin="true"&gt;
  &lt;label for="login-email"&gt;E-mail&lt;/label&gt;
  &lt;input type="text" name="session_key" id="login-email" placeholder="E-mail ou número de telefone" autofocus="autofocus"&gt;
  &lt;label for="login-password"&gt;Senha&lt;/label&gt;&lt;input type="password" name="session_password" id="login-password" aria-required="true" placeholder="Senha"&gt;
  &lt;input name="isJsEnabled" type="hidden" value="false"&gt;
  &lt;input name="loginCsrfParam" id="loginCsrfParam-login" type="hidden" value="1802cd0f-af50-45b8-810c-2ecc3bac3c72"&gt;
  &lt;input name="trk" id="trk-login" type="hidden" value="nav_responsive_tab_home"&gt;
  &lt;input name="sourceAlias" id="sourceAlias-login" type="hidden" value="0_7r5yezRXCiA_H0CRD8sf6DhOjTKUNps5xGTqeX8EEoi"&gt;
  &lt;input type="submit" name="submit" value="Entrar"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/P0nhs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P0nhs.png" alt="login"></a></p>