I am trying to develop a small Python tool to interact with my flickr account. I want to keep it simple so I decided to use the Flickr account I already have configured in my system (online accounts framework).
I have studied the Online Accounts for application developers tutorial and was able to get my Flickr account details.
The problem appeared when I tried to use the flickrapi module. I have tried the latest version from and as well as the version available via apt in 13.04. The API has changed a bit, but both tries ended with a message that I have an invalid oauth token. This is what I have tried:
latest source from flickrapi hg repo
import flickrapi flickr = flickrapi.FlickrAPI(u"d87224f0b467093b2a87fd788d950e27", u"4c7e48102c226509", token=flickrapi.auth.FlickrAccessToken(u"my_token", u"my_token_secret", u"write", u'DarGad', u'dargad', u'user_nsid')) flickr.test.login()
which leads to:
ERROR:flickrapi.auth.OAuthFlickrInterface:do_request: Status code 400 received, content: ERROR:flickrapi.auth.OAuthFlickrInterface: oauth_problem=parameter_absent ERROR:flickrapi.auth.OAuthFlickrInterface: oauth_parameters_absent=oauth_token
version from apt-get (1.2-3)
import flickrapi flickr = flickrapi.FlickrAPI("d87224f0b467093b2a87fd788d950e27", "4c7e48102c226509", token="my_token") flickr.test_login()
FlickrError: Error: 98: Invalid auth token.
I have also tried different combinations of
FlickrAPI constructor flags (e.g.
cache) without success.
I have used a similar approach for Twitter (used python-twitter module from apt) and it worked perfectly with the account I already had configured.
My guess is the problem is with flickrapi, since the same token works with Shotwell and unity-photos-lens. I have checked their sources and none do not uses flickrapi (and Shotwell is not even in Python).
I will appreciate any hints on making flickrapi work with the online accounts framework. Or maybe there is another Python module that works correctly with online accounts? I have also tried flickr.py and python-flickr-api but I got impression that both are outdated - no success with them either.