sybrenstuvel / flickrapi

Python Flickr API implementation
https://stuvel.eu/flickrapi
Other
155 stars 33 forks source link

Api does only return public albums #139

Open Matthijz98 opened 2 years ago

Matthijz98 commented 2 years ago

Hi,

I try to use this package to get a list of albums but i only get the public albums and i need the private ones as well.

flikr_albums = settings.FLICKR.photosets.getList(per_page=50, page=[page],)

And i use this code to get the token for my application:

        if os.getenv('FLICKR_API_KEY'):
            self.stdout.write(self.style.SUCCESS('No ENV found'))
            # Only do this if we don't have a valid token already
            if not settings.FLICKR.token_valid(perms='read'):
                self.stdout.write(self.style.SUCCESS('Need new token'))
                # Get a request token
                settings.FLICKR.get_request_token(oauth_callback='oob')

                # Open a browser at the authentication URL. Do this however
                # you want, as long as the user visits that URL.
                authorize_url = settings.FLICKR.auth_url(perms='read')
                print(authorize_url)
                self.stdout.write(self.style.SUCCESS(authorize_url))
                # webbrowser.open_new_tab(authorize_url)

                # Get the verifier code from the user. Do this however you
                # want, as long as the user gives the application the code.
                verifier = str(input('Verifier code: '))

                # Trade the request token for an access token
                settings.FLICKR.get_access_token(verifier)
            else:
                self.stdout.write(self.style.SUCCESS('No login needed'))