4

I am just trying to get list of Albums in a web app using following c# code.

For AccessToken, I wen to OAuthPlaygound and generated an accessToken with Picasa in scope using valid consumer key and password which relevant to my web application.

Issue :When I execute following code, I get 403 forbidden error along with message as "Invalid Token" error on last line if I use SetAuthenticationToken() option. However, if I use setUserCredentialss(), it works. Could anyone please help me in this? Is it that token generated using OAuth Playground doesn't work here? Or to use client library token should also be geenrated using it? Is there any 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); 
helloworld
  • 2,179
  • 3
  • 24
  • 39

0 Answers0