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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freegeoip.net API endpoint is deprecated and will stop working on July 1st, 2018 #13

Open
shanness opened this issue Jun 19, 2018 · 1 comment

Comments

@shanness
Copy link

Hey there, not sure if you are still maintaining this, but looks like it's about to break!

Will require a API key and a new endpoint.

curl -s http://freegeoip.net/json/14.200.56.93
{"deprecation_message":"This API endpoint is deprecated and will stop working on July 1st, 2018. For more information please visit: https://github.com/apilayer/freegeoip#readme","ip":"14.200.56.93","country_code":"AU","country_name":"Australia","region_code":"NSW","region_name":"New South Wales","city":"Marrickville","zip_code":"2204","time_zone":"Australia/Sydney","latitude":-33.9032,"longitude":151.1518,"metro_code":0}

@shanness
Copy link
Author

Changing the two lines in FreegeoipProvider.java from

  private static final String SERVICE_URL_INDEX = "http://freegeoip.net/json/";
  private static final String RESPONSE_NOT_FOUND = "not found";

To

    private static final String SERVICE_URL_INDEX = "https://freegeoip.app/json/";
    private static final String RESPONSE_NOT_FOUND = "404 page not found";

Fixes the problem, as freegeoip.net is now dead, and the .app is a great replacement (free and 15,000 requests per hour allowed with no account rego crap).

I've implemented as a custom provider (nice docs and interface on that!), to make us more agile in the future, but thought you might like to know this can be rescued easily :)

Cheers, and thanks for a very nicely written plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant