Module Description:
This module is designed to obtain basic geographical information about the client through two external APIs. Its main functionality is to determine the IP address and the name of the city where the user accessing the application is located. This information can be used to personalize the user experience, display localized content, or log relevant data about the client’s location.
Main Features:
IP Address Retrieval:The module connects to an external API to obtain the client's public IP address. The API returns the IP of the device from which the client is accessing the application.
City Determination:Using the obtained IP address, the module makes a second call to a geolocation API. This API identifies the geographical location of the client based on the IP and returns relevant information such as the name of the city.
Application Usage:
The module can be integrated into any screen or flow of the application that requires information about the client's location. The information returned by the APIs can be used to:
Benefits:
APIs Used:
Changes notes:
- Using new public api
- No api key needed
- Better code