Gdata SetAuthenticationToken () - 403 prohibited

I am just trying to get a list of albums in a web application using the following C # code.

For AccessToken , I joined OAuthPlaygound and created an accessToken with Picasa scope using a valid user key and password related to my web application.

Problem . When I execute the following code, I get a 403 forbidden error along with the message as “Invalid token” on the last line if I use the SetAuthenticationToken () parameter. However, if I use setUserCredentialss (), it works. Can anyone help me with this? Is this the token created using the OAuth playground doesn’t work here? Or should a client library token be used with it? Is there a workaround?

PicasaService service = new PicasaService("codesamples.google.com"); service.SetAuthenticationToken(accessToken); //Doesn't works //service.setUserCredentials("myUsername", "myPassword"); //Works AlbumQuery query = new AlbumQuery(PicasaQuery.CreatePicasaUri(username)); PicasaFeed feed = service.Query(query); 
+4
source share

All Articles