This project has moved and is read-only. For the latest updates, please go here.

Bypass Flickr Authorization Page

Topics: Developer Forum, Project Management Forum, User Forum
Jun 18, 2014 at 12:47 PM
I am uploading photos to Flickr. Its working perfect. But for every request, Flickr asks my permission to authorize the app (check screenshot below):


My question: is there any way I authorize the app once for my whole life rather it asks for my permission for each photo to upload?
Jun 18, 2014 at 1:32 PM
Just store and reuse the OAuthToken and OAuthTokenSecret.

Jun 18, 2014 at 1:36 PM
Edited Jun 18, 2014 at 1:37 PM
Do you mean OAuthRequestToken.Token and OAuthRequestToken.TokenSecret by OAuthToken and OAuthTokenSecret?

Is there any expiry of these tokens? If yes then the same problem still exists; I need to get the token after its expiry. If not then it'll work.
Jun 18, 2014 at 1:51 PM
Another thing, I need "oauth_verifier" too to generate OAuthAccessToken that is used to upload pictures. Should I need to save the "oauth_verifier" as well? Following is the code of my controller. Please guide me where and what changes I need to do?
public static string secret = "my secret";
        public static string apikey = "my key";
        Flickr myFlickr = new Flickr(apikey, secret);
        public ActionResult Index()
            Flickr.CacheDisabled = true;
            OAuthRequestToken requestToken = myFlickr.OAuthGetRequestToken("http://localhost:1568/home/authenticated");
            var url = myFlickr.OAuthCalculateAuthorizationUrl(requestToken.Token, AuthLevel.Delete);
            Session["reqtoken"] = requestToken;
            ViewBag.URL = url;
            return Redirect(url);
        public ActionResult Authenticated(string oauth_verifier)
            OAuthRequestToken requestToken = (OAuthRequestToken)Session["reqtoken"];
            var accessToken = myFlickr.OAuthGetAccessToken(requestToken, oauth_verifier);
            myFlickr.OAuthAccessTokenSecret = accessToken.TokenSecret;
            myFlickr.OAuthAccessToken = accessToken.Token;
            string FileuploadedID = myFlickr.UploadPicture(@"C:\Chrysanthemum.jpg", "TwittingRoom", "TwittingRoom Image", "ClientName", true, false, false);
            PhotoInfo oPhotoInfo = myFlickr.PhotosGetInfo(FileuploadedID);
            ViewBag.Message = oPhotoInfo.LargeUrl;
            return View();
Jun 18, 2014 at 3:54 PM
No, I mean the OAuthAccessToken returned by OAuthGetAccessToken.

The request token is only valid for 1 hour, so that would be no use.