GMAIL(Google Webmail) Login Problem (General questions)
Hi, having trouble using this control to work on google.com/mail
Here is my Code:
Private Sub Command3_Click()
hg.Request.UserAgent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
hg.Get https://www.google.com/accounts/ServiceLogin
End Sub
Private Sub hg_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
Dim strData As String
strData = hg.Response.Body
strCookie = hg.Response.Cookies.ToString
txtData.Text = strData
If InStr(1, strData, GALX ) Then
strDSH = Split(strData, name= dsh )(1)
strDSH = Split(strDSH, /> )(0)
strDSH = Split(strDSH, value= )(1)
strDSH = Split(strDSH, )(0)
strGALX = Split(strData, name= GALX )(1)
strGALX = Split(strGALX, /> )(0)
strGALX = Split(strGALX, value= )(1)
strGALX = Split(strGALX, )(0)
Debug.Print strDSH
Debug.Print strGALX
'ltmpl=default<mplcache=2&continue=http 3A 2F 2Fmail.google.com 2Fmail 2F 3F&service=mail&rm=false&dsh=-8736160190816270306<mpl=default<mpl=default&scc=1&timeStmp=&secTok=&GALX=QzhFCiCSCw4&Email=removed&Passwd=removed&rmShown=1&signIn=Sign+in&asts=
hg.Request.Referer = hg.URL
hg.Request.Cookies.Add GALX , strGALX
hg.Request.UserAgent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
hg.Request.FormPost.Add ltmpl , default
hg.Request.FormPost.Add ltmplcache , 2
hg.Request.FormPost.Add continue , http 3A 2F 2Fmail.google.com 2Fmail 2F 3F&service=mail
hg.Request.FormPost.Add rm , false
hg.Request.FormPost.Add dsh , strDSH
hg.Request.FormPost.Add scc , 1
hg.Request.FormPost.Add timeStmp ,
hg.Request.FormPost.Add secTok ,
hg.Request.FormPost.Add GALX , strGALX
hg.Request.FormPost.Add Email , removed
hg.Request.FormPost.Add Passwd , removed
hg.Request.FormPost.Add rmShown , 1
hg.Request.FormPost.Add signIn , Sign+in
hg.Request.FormPost.Add asts ,
hg.URL = https://www.google.com/accounts/ServiceLoginAuth
hg.Post https://www.google.com/accounts/ServiceLoginAuth
End If
End Sub
There are a few more steps after this part of the login but I can't even get past the 2nd step.
The Data that is returned says: The page you requested is invalid
Anyone see what I'm doing wrong here?