• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Java to Login to an HTTPS Website  RSS feed

 
Parth Sagdeo
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm interested in making a program to log into yahoo.com and check my various stock portfolios. I already know how to access static web pages in Java, but this poses a unique challenge because it requires cookies and it uses SSH authentication (the https protocol). Does anyone have any tips on how I can get this to work, or know any helpful resources? I believe YPOPs (YPOPs does something similar (log in to Yahoo programatically), but their forums are pretty much dead. My biggest question right now is how I might accept cookies in Java so I can move around yahoo in a logged in state. Any ideas?

Thanks,
Parth
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parth Sagdeo:
I'm interested in making a program to log into yahoo.com and check my various stock portfolios. I already know how to access static web pages in Java, but this poses a unique challenge because it requires cookies and it uses SSH authentication (the https protocol). Does anyone have any tips on how I can get this to work, or know any helpful resources? I believe YPOPs (YPOPs does something similar (log in to Yahoo programatically), but their forums are pretty much dead. My biggest question right now is how I might accept cookies in Java so I can move around yahoo in a logged in state. Any ideas?

Thanks,
Parth

FYI,
Yahoo exposes mail and a few other of their services via Web services, but sadly for you, they have not yet exposed services to access user portfolios. If they would have done that, then it would have been very easy for you.
I am not sure, how easy it will be to access your protfolios simulating browser requests, as this is the first thing yahoo would have considered to secure the web access. But, yeah thats just a thought.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not post the same question to multiple forums. Now you have answers here and here, and peoples time and effort to help you is being duplicated and thus wasted: CarefullyChooseOneForum
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the following classes

com.jscape.inet.https.Https
com.jscape.inet.http.HttpSession

The HttpSession class has some automatic session/cookie handling built in for easy navigation and supports HTTP/S

http://www.jscape.com/secureinetfactory/
 
Lavern Matthew
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parth Sagdeo:
I'm interested in making a program to log into yahoo.com and check my various stock portfolios. I already know how to access static web pages in Java, but this poses a unique challenge because it requires cookies and it uses SSH authentication (the https protocol). Does anyone have any tips on how I can get this to work, or know any helpful resources? I believe YPOPs (YPOPs does something similar (log in to Yahoo programatically), but their forums are pretty much dead. My biggest question right now is how I might accept cookies in Java so I can move around yahoo in a logged in state. Any ideas?

Thanks,
Parth


Did you ever complete this task? If not, then we should start a sf project dedicated to authenticating to all the major sites out there...
[ April 10, 2008: Message edited by: Lavern Matthew ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!