Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flickr] default API key disabled #4332

Closed
c0001 opened this issue Jul 21, 2023 · 15 comments
Closed

[flickr] default API key disabled #4332

c0001 opened this issue Jul 21, 2023 · 15 comments

Comments

@c0001
Copy link

c0001 commented Jul 21, 2023

commit: 3c2c7e2 (Tue Jul 18 18:37:50 2023 +0200)
Reproduce:

gallery-dl -j https://www.flickr.com/photos/91707070@N03

then we got nothing as an empty array []

馃憤
Thanks for this nice project.

@c0001 c0001 changed the title [flickr] extractor always grabs nothing as emtpy array [] since flickr server updates [flickr] extractor always grabs nothing as emtpy array [] since flickr website's api change (or maybe?) Jul 21, 2023
@jamesxff
Copy link

jamesxff commented Jul 21, 2023

Trying to make a request since yesterday:

[flickr][error] API request failed: Invalid API Key (Key has expired)

Trying to re-authorise using gallery-dl oauth:flickr:

[oauth][info] Using default flickr API key (ac4fd7aa98585b9eee1ba761c209de68)
[oauth][info] Opening URL in :
https://www.flickr.com/services/oauth/authorize?oauth_token=72157720888852673-3034e20163c4cccc&perms=read

Website comes up advising:

2023-07-21 08_38_33-Flickr_ Authorize

Flickr still shows gallery-dl as an active account link however:

2023-07-21 08_40_57-Sharing   Extending _ Flickr

Hopefully this helps figure things out, wish I could assist more but my head can't get round coding stuff at present.

@chio0hai
Copy link
Contributor

Instructions for getting your own api key:
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorflickrapi-key--api-secret

@jamesxff
Copy link

Instructions for getting your own api key: https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorflickrapi-key--api-secret

Yep that worked, thanks.

@mikf
Copy link
Owner

mikf commented Jul 22, 2023

I got this mail on July 20th:

Flickr API Terms of Use Violation

Dear mikf123, We've disabled your API key: ac4fd7aa98585b9eee1ba761c209de68 The rate at which you calling the API is a violation of the Flickr API Terms of Use: http://www.flickr.com/services/api/tos/ You will need to slow down the application making the calls. Should you wish to have your key re-enabled, please respond to this query providing information on what you're using the Flickr API for. Regards, Flickr

Interesting that is says "please respond to this query" while coming from noreply@flickr.com

@mikf mikf changed the title [flickr] extractor always grabs nothing as emtpy array [] since flickr website's api change (or maybe?) [flickr] default API key disabled Jul 22, 2023
@mikf mikf added the site:news label Jul 22, 2023
@mikf mikf pinned this issue Jul 22, 2023
mikf added a commit that referenced this issue Jul 22, 2023
and add a delay between API requests
@c0001
Copy link
Author

c0001 commented Jul 23, 2023

@mikf Shall I close this issue since you update the default key which seems worked again?

@Hrxn
Copy link
Contributor

Hrxn commented Aug 2, 2023

@c0001 Well, yeah, if it's working for you, I'd suggest going ahead and close this issue, yes.

@mikf mikf closed this as completed Aug 4, 2023
@expecttheunusual
Copy link

New to G-DL. How do you set up the conf to use my own keys assume I have them as [KEY] and [SECRET-KEY]? The docs are quite quirky to understand for an average joe.

@expecttheunusual
Copy link

{"extractor":{ "flickr": { "access-token": "1234567890-abcdef", "access-token-secret": "1234567890abcdef", "size-max": 1920 } } }

@expecttheunusual
Copy link

I suggest you could cycle the api keys every single time to avoid this from happening again. random-choice.

@expecttheunusual
Copy link

[flickr][error] AuthenticationError: Invalid auth token

@Hrxn
Copy link
Contributor

Hrxn commented Aug 5, 2023

You need four values. In two simple steps.

But first of all, you need a Flickr account. To begin, sign in with your account. Then:

  1. api-key and api-secret
    • Make sure that these two values are correctly set in your configuration file.
  2. access-token and access-token-secret from doing the oauth authorization
    • Confirm this step with authorizing the "app" in your Flickr account, you now get the two final values. Add to your config as described.

@eytay
Copy link

eytay commented Aug 7, 2023

You need four values. In two simple steps.

1. [`api-key` and `api-secret`](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorflickrapi-key--api-secret)

2. [`access-token` and `access-token-secret`](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorflickraccess-token--access-token-secret) from doing the [oauth](https://github.com/mikf/gallery-dl#oauth) authorization

oauth isn't working as highlighted by @jamesxff. Is there a way around it?

@mikf
Copy link
Owner

mikf commented Aug 7, 2023

It will work again after you've set api-key and api-secret.

The values you get from oauth:flickr aren't even necessary (but they help).
The only value you really need is a new api-key.

@estatistics
Copy link

estatistics commented Aug 22, 2023

i have registered and taken some 'access-token' and 'access-token-secret' . it says These values have been cached and will automatically be used.. This means that running gallery-dl flickr.com/userprofile will be used automatically these values and thus download hires pics where available? Or i need to put them in a config file? If i like to download info on photos i need to specify --write-info-json option? It downloads general info of user and not for each photo.

@Hrxn
Copy link
Contributor

Hrxn commented Aug 22, 2023

If they are cached, they are used automatically, yes.

You can also put them in your config file.
Personally, I'd recommend it. Use a config file if you are not already, it's definitely worth it and actually easy to use.
With your config file, it's also easy to set up a postprocessor for metadata extraction of all photo information in the way you want..

@mikf mikf mentioned this issue Sep 22, 2023
@mikf mikf unpinned this issue Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants