Thanks Mark, now i'm using oAuth2. If I create manually the Access Token from https://developers.google.com/oauthplayground, it works until expires. After that, I have to refresh manually.
Is there a way to get Access Token programmatically? I tried to do a POST request to https://www.googleapis.com/oauth2/v3/token, to get the Access Token, passing Client_Id\Client_Secret\Refresh_Token\Grant_Type, but I always get 400 error: bad request. Could you help me please?? This is vbnet code: Dim Host As String = "https://www.googleapis.com/oauth2/v3/token" Dim client_id As String = Uri.EscapeDataString("682387278667-e4fbdrdcb7rheje5fh4usj1hmt9qlsvp.apps.googleusercontent.com") Dim client_secret As String = Uri.EscapeDataString("68o6e0KXpud96hbV3pVpN1M7") Dim refresh_token As String = Uri.EscapeDataString("1/3QgKpr02aBG-mTRvoZgEzxowPiN9mgCHv6ItSi_EMT0") Dim postData As New ArrayList postData.Add("client_id=" & client_id) postData.Add("client_secret=" & client_secret) postData.Add("refresh_token=" & refresh_token) postData.Add("grant_type=refresh_code") Dim data As String = String.Join("&", postData.ToArray()) Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://www.googleapis.com/oauth2/v3/token ") Dim byteData() As Byte = System.Text.Encoding.UTF8.GetBytes(data) request.Host = "www.googleapis.com" request.Method = System.Net.WebRequestMethods.Http.Post request.ProtocolVersion = System.Net.HttpVersion.Version11 request.ContentType = "application/x-www-form-urlencoded" request.ContentLength = byteData.Length Dim dataStream As IO.Stream = request.GetRequestStream() dataStream.Write(byteData, 0, byteData.Length) dataStream.Close() Dim response As System.Net.HttpWebResponse = request.GetResponse() --> ERROR 400: BAD REQUEST Dim reader As IO.Stream = response.GetResponseStream() response.Close() Thanks! Il giorno venerdì 29 maggio 2015 16:32:15 UTC+2, Mark Otway ha scritto: > Are you using OAuth2? Support for user/password credentials was ceased > last month, so if you’re not using OAuth2, your app won’t work. > > On 29 May 2015, at 09:08, Francesco Defazio <[email protected] > <javascript:>> wrote: > > Hi all, since 27th May 2015 I'm not able to upload pictures using picasa > Api. > I get always the same error: > Execution of authentication request returned unexpected result: 404 > > The crediantials it wasn't change and by browser I can login without > problems. > My application running succesfully since October 2011. > > The code of my application is: > Dim reqSet As New Google.GData.Client.RequestSettings("GM") > Dim picasarequest As Google.Picasa.PicasaRequest > Dim service As New Google.GData.Photos.PicasaService("") > reqSet.Timeout = 600000 > picasarequest = New Google.Picasa.PicasaRequest(reqSet) > service = picasarequest.Service > service.setUserCredentials(PicasaUserName, PicasaPassword) > reqSet = Nothing > picasarequest = Nothing > > Dim feed As Google.GData.Photos.PicasaFeed > Dim entry As Google.GData.Photos.PicasaEntry > Dim postUri As Uri > Dim album As Google.GData.Photos.AlbumAccessor > Dim StartIndex As Integer = 1 > Dim AlbumId As String = "" > > > Dim newEntry As New Google.GData.Photos.AlbumEntry > Dim feedUri As Uri > Dim AlbumSummary As String > > AlbumSummary = GetAlbumSummary(AlbumNameCurrent) > newEntry.Title.Text = AlbumNameCurrent > newEntry.Summary.Text = AlbumSummary > album = New > Google.GData.Photos.AlbumAccessor(newEntry) > > If PhotoTypeCurrent = enPhotoType.Shipment Then > album.Access = "private" > Else > album.Access = "public" > End If > > feedUri = New > Uri(Google.GData.Photos.PicasaQuery.CreatePicasaUri(PicasaUserName)) > album = New > Google.GData.Photos.AlbumAccessor(service.Insert(feedUri, newEntry)) > > I got the error in the last operation: > album = New > Google.GData.Photos.AlbumAccessor(service.Insert(feedUri, newEntry)) > > I also get the error with: feed = service.Query(query) > > Dim query As Google.GData.Photos.AlbumQuery > Dim feed As Google.GData.Photos.PicasaFeed > > query = New > Google.GData.Photos.AlbumQuery(Google.GData.Photos.PicasaQuery.CreatePicasaUri(PicasaUserName)) > query.StartIndex = 1 > query.NumberToRetrieve = 1000 > feed = service.Query(query) > > Thank in advance > > > > > > > > -- > 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 [email protected] <javascript:> > . > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at http://groups.google.com/group/google-picasa-data-api. > For more options, visit https://groups.google.com/d/optout. > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-picasa-data-api. For more options, visit https://groups.google.com/d/optout.
