Here is the working code for Photo upload with metadata using OAuth 2.0 in C#
string responseString = ""; string filePath = "COMPLETE FILE PATH" string extension=(Path.GetExtension (filePath)).TrimStart (' .'); byte[] image = System.IO.File.ReadAllBytes(filePath); int imglenth= image.Length; String boundary = " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; Console.WriteLine("BOUNDARY:" + boundary); StringBuilder writeData = new StringBuilder(); writeData.Append("--").Append(boundary).Append("\r\n"); writeData.Append("Content-Type: application/atom+xml;\r\n\r \n"); writeData.Append("<entry xmlns='http://www.w3.org/2005/Atom' >\r\n"); writeData.Append("<title>"+Path.GetFileName (filePath)+"</ title>\r\n"); writeData.Append("<summary></summary>\r\n"); writeData.Append("<category scheme=\"http://schemas.google. com/g/2005#kind\"\r\n"); writeData.Append("term=\"http://schemas.google.com/photos/ 2007#photo\"/>\r\n"); writeData.Append("</entry>\r\n"); writeData.Append("--").Append(boundary).Append("\r\n"); writeData.Append("Content-type: image/"+extension+"\r\n\r\n" ); StringBuilder endOfPart = new StringBuilder(); endOfPart.Append("\r\n--").Append(boundary).Append("--"); long totalLenght = writeData.Length + image.Length + endOfPart.Length; Uri serverUrl = new Uri("https://picasaweb.google.com/data/ feed/api/user/default/albumid/"+albumId+"?access_token=YOUR ACCESS TOKEN HERE"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create( serverUrl+tc.auth_Token); request.Method = "POST"; byte[] bytes,bytes1; bytes = System.Text.Encoding.ASCII.GetBytes(writeData. ToString ()); bytes1= System.Text.Encoding.ASCII.GetBytes(endOfPart. ToString ()); request.ContentType ="multipart/related; boundary=\"" + boundary + "\""; request.ContentLength = totalLenght; request.Headers.Add("GData-Version","2"); request.Headers.Add("MIME-Version","1.0"); Stream requestStream = request.GetRequestStream(); requestStream.Write(bytes, 0, bytes.Length); requestStream.Write(image,0,image.Length); requestStream.Write (bytes1,0,bytes1.Length); HttpWebResponse response; response = (HttpWebResponse)request.GetResponse(); if(requestStream!=null) requestStream.Close (); if(response!=null) response.Close (); Hope this helps :) -- You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-picasa-data-api+unsubscr...@googlegroups.com. To post to this group, send email to google-picasa-data-api@googlegroups.com. Visit this group at http://groups.google.com/group/google-picasa-data-api. For more options, visit https://groups.google.com/d/optout.