title: Excel vba Login to the site
body: <p>I am trying to login to the site : <a href="https://cube.tradejini.com/#/" rel="nofollow noreferrer">https://cube.tradejini.com/#/</a> and retrieve the cookie information.</p>
  <p>below is my html code.. but its failing at validating the credentials, anyone please guide.. as I am novice to VBA.</p>
  <p>Also note that the webpage takes 3 fields for the validation. username, password and a question.</p>
  <p>url = &quot;https://cube.tradejini.com/#/&quot;</p>
  <pre><code>With CreateObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)
      .Open &quot;POST&quot;, url, False
      .setRequestHeader &quot;REFERER&quot;, url
      .setRequestHeader &quot;User-Agent&quot;, &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)&quot;
      .setRequestHeader &quot;content-type&quot;, &quot;application/json&quot;
      .setRequestHeader &quot;Accept&quot;, &quot;text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&quot;
      .setRequestHeader &quot;Accept-Language&quot;, &quot;en-us,en;q=0.5&quot;
      .setRequestHeader &quot;Accept-Charset&quot;, &quot;ISO-8859-1,utf-8;q=0.7,*;q=0.7&quot;
      .SetCredentials &quot;TSUser1&quot;, &quot;Password&quot;, &quot;1989&quot;
      .send        
  strCookie = .GetAllResponseHeaders
  
  End With
  </code></pre>