Title: Change API endpoint
Last modified: August 8, 2018

---

# Change API endpoint

 *  Resolved [SK](https://wordpress.org/support/users/sooskriszta/)
 * (@sooskriszta)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/change-api-endpoint/)
 * [@damiarita](https://wordpress.org/support/users/damiarita/) freegeoip.net has
   moved to ipstack.com so you need to change the API endpoint. Also, it requires
   an API key.
 * Also, IPStack’s JSON callback is like this:
 *     ```
       http://api.ipstack.com/IP_ADDRESS
           ? access_key = YOUR_ACCESS_KEY
           & callback = MY_FUNCTION
       ```
   
 * Also, the free API provides a response on http. So simply the protocol-independent“//”
   won’t work. You need to put “[http://&#8221](http://&#8221);
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchange-api-endpoint%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [paulovsky](https://wordpress.org/support/users/paulovsky/)
 * (@paulovsky)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/change-api-endpoint/#post-10809743)
 * [@oc2ps](https://wordpress.org/support/users/oc2ps/)
 * replace the code in script.min.js with this:
 * `var intl_tel_default_setting={initialCountry:"auto",utilsScript:wpcf7_utils_url,
   geoIpLookup:function(t){jQuery.get("//ipinfo.io",function(){},"jsonp").always(
   function(e){var n=e&&e.country?e.country:"";t(n)})}};jQuery(".wpcf7-intl-tel").
   each(function(){var t=jQuery(this),e={};void 0!=t.data("preferredcountries")&&""!
   =t.data("preferredcountries")&&(e.preferredCountries=t.data("preferredcountries").
   split("-")),t.intlTelInput(Object.assign({},intl_tel_default_setting,e));var 
   n=t.parents("span")[0];t.parents("form").submit(function(){jQuery(n).children("
   input.wpcf7-intl-tel-full").val(t.intlTelInput("getNumber")),jQuery(n).children("
   input.wpcf7-intl-tel-country-name").val(t.intlTelInput("getSelectedCountryData").
   name),jQuery(n).children("input.wpcf7-intl-tel-country-code").val(t.intlTelInput("
   getSelectedCountryData").dialCode),jQuery(n).children("input.wpcf7-intl-tel-country-
   iso2").val(t.intlTelInput("getSelectedCountryData").iso2)})});`

Viewing 1 replies (of 1 total)

The topic ‘Change API endpoint’ is closed to new replies.

 * ![](https://ps.w.org/international-telephone-input-for-contact-form-7/assets/
   icon-256x256.png?rev=2277878)
 * [International Telephone Input for Contact Form 7](https://wordpress.org/plugins/international-telephone-input-for-contact-form-7/)
 * [Support Threads](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [paulovsky](https://wordpress.org/support/users/paulovsky/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/change-api-endpoint/#post-10809743)
 * Status: resolved