I see that only IPStack is supported in the below page.
import { Meteor } from 'meteor/meteor'
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'
import { ValidatedMethod } from 'meteor/mdg:validated-method'
import { HTTP } from 'meteor/http'
import { logRateLimit } from '/server/security/rate-limiter'
const name = 'General.getUserLocation'
const getUserLocation = new ValidatedMethod({
name,
mixins: [],
validate: null,
run () {
const { ipstack_api_key: key } = Meteor.settings.private
let ip
try {
if (Meteor.isDevelopment) {
ip = HTTP.get('https://jsonip.com/').data.ip
} else {
ip = this.connection.clientAddress
This file has been truncated. show original
Would it be possible to add the option to choose the IP2Location.io API?
An IP Geolocation API tool that provides geolocation information like country, city, ISP, proxy and so on in JSON and XML formats by using users' IP addresses.
Without an API key, it will allow 500 geolocation queries per day. If subscribed to the free API plan and using its API key, the user can get 30,000 queries per month.
1 Like
That sounds like an excellent idea. @Marvelxy and @WebDev team can anyone see any issues with making this change?