We are trying to log the location of our visitors, without storing their actual IP address on our servers.
To geolocate the IP address, we use an external service, to which we make an API request with the user's IP, and the service returns the approximate geolocation we store in our database.
The service is not 100% accurate, more than often it just points to the provider's exchange location For us this is enough since it is usually in the same city as the original ip address.
Is passing the user's IP address to the external service for processing considered okay without the user's explicit consent under the GDPR?