API call for getting IP address