1

I am attempting to log in to Photobucket.com without using there API. This is the code I am using but it keeps kicking back the login page.

Thanks for any help, I have been messing with this for days.

string formUrl = "https://login.photobucket.com/login";
string formParams = string.Format("ts={0}&sig={1}&usernameemail={2}&password={3}&redir={4}&redirectAction={5}&redirectParams={6}&returnUrl={7}&action={8}", ts, sig, email, password,"","","","","login");

string cookieHeader;
WebRequest req = WebRequest.Create(formUrl);
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes(formParams);
req.ContentLength = bytes.Length;
Using (Stream os = req.GetRequestStream())
{
  os.Write(bytes, 0, bytes.Length);
}
WebResponse resp = req.GetResponse();
cookieHeader = resp.Headers["Set-cookie"];
Fosco
  • 38,138
  • 7
  • 87
  • 101
Corey
  • 11
  • 2
  • 1
    But... that's the whole point of an API. – vcsjones Jun 13 '11 at 03:37
  • I need users to be able to log in to there own private photobuckets which is currently not supported by api. http://photobucket.com/developer/forum?read,2,327 – Corey Jun 13 '11 at 04:16

0 Answers0