alexis-mignon / python-flickr-api

A python implementation of the Flickr API
BSD 3-Clause "New" or "Revised" License
367 stars 108 forks source link

How to use already existing api key, secret and access_token ? #137

Open khurshid-alam opened 10 months ago

khurshid-alam commented 10 months ago

I already have access token generated from other python script. How do I use that ?

Is thare a way to create "auth.txt" manually and then pass it to handler ? I just don't know the format of auth.txt file.

flickr.set_keys(api_key="YOUR_API_KEY",
                api_secret="YOUR_SECRET_KEY")
flickr.set_auth_handler(".auth.txt") # or whatever you save your auth file as
beaufour commented 10 months ago

I've honestly not looked at the authentication code for quite a while, but the wiki has this information: https://github.com/alexis-mignon/python-flickr-api/wiki/Flickr-API-Keys-and-Authentication

khurshid-alam commented 10 months ago

Yes. I want to know what usually stores in auth.txt file ? Is it access token ?

I just don't want to go through authentication process just to retrieve a new token.

beaufour commented 10 months ago

ah, I didn't read your question properly. The format is a file with two lines. The first is the token key and second is the token secret

token_key
tokey_secret