Telize

PAID
By Frederic Cambus | Updated 5 days ago | Location
Popularity

9.8 / 10

Latency

83ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Cannot Connect to Telize

Rapid account: Jadennyberg
jadennyberg
8 years ago

Hello there,
I have just subscribed to the Telize API and cannot seem to connect to the service.
Can you please provide the proper method to connect with the code below:

<script>
$.ajaxSetup({
headers : {
‘X-Mashape-Key’ : ‘YoaM9mnYUImsheCWJ2EQoYu5sRTtp1y1HqwjsnW4b2yMvIxhsN’
}
});
jQuery.getJSON(‘https://telize-v1.p.mashape.com/geoip?callback=getgeoip’, function (data) {
//jQuery.getJSON(‘http://freegeoip.net/json/github.com’, function(location) {
//console.log(location.country_code);
var usprice = ‘$1,140.00 US’;
var canprice = ‘$1,460.00 CAN’;
var ukprice = ‘£1,067.00 VAT Included’;
var europrice = ‘€1,476.00 VAT Included’;
var swissprice = ‘1,580.00 SFr. VAT Included’;
if (location.country_code == ‘BE’ || location.country_code == ‘EL’ || location.country_code == ‘LT’ || location.country_code == ‘PT’ || location.country_code == ‘BG’ || location.country_code == ‘ES’ || location.country_code == ‘LU’ || location.country_code == ‘RO’ || location.country_code == ‘CZ’ || location.country_code == ‘FR’ || location.country_code == ‘HU’ || location.country_code == ‘DK’ || location.country_code == ‘HR’ || location.country_code == ‘MT’ || location.country_code == ‘SK’ || location.country_code == ‘DE’ || location.country_code == ‘DE’ || location.country_code == ‘IT’ || location.country_code == ‘NL’ || location.country_code == ‘FI’ || location.country_code == ‘EE’ || location.country_code == ‘CY’ || location.country_code == ‘AT’ || location.country_code == ‘SE’ || location.country_code == ‘IE’ || location.country_code == ‘LV’ || location.country_code == ‘PL’ || location.country_code == ‘SI’ || location.country_code == ‘IS’ || location.country_code == ‘NO’ || location.country_code == ‘ME’ || location.country_code == ‘RS’ || location.country_code == ‘TR’ || location.country_code == ‘AM’ || location.country_code == ‘AZ’ || location.country_code == ‘BY’ || location.country_code == ‘MD’ || location.country_code == ‘UA’ || location.country_code == ‘GE’) {
$(’#retail-price’).html(europrice);

	    } else if (location.country_code == 'CH' || location.country_code == 'LI') { 
	     	$('#retail-price').html(swissprice);
	    } else if (location.country_code == 'UK' || location.country_code == 'GB') {
	    	$('#retail-price').html(ukprice);
	    } else if (location.country_code == 'CA') {
	    	$('#retail-price').html(canprice);
	    } else {
	    	$('#retail-price').html(usprice);
	    }

});
</script>
<h4>MSRP: <span id=“retail-price”></span></h4>

Rapid account: Fcambus
fcambus Commented 8 years ago

Hello,

When using jQuery you need to set the callback value to “?”. In your case, replace callback=getgeoip by callback=? and it should start working.

For information, the error message you mentioned is not related to Telize, it is returned by Facebook Connect .

Regards.

Rapid account: Jadennyberg
jadennyberg Commented 8 years ago

Hi there,
Thanks for your response. I did see this info in another thread and tried it out.
It doesn’t seem to work for me. I get the following message in my console:

Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App’s settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App’s domains.

I have a live test of this at the following url: http://www.prestigeguitars.com/classic.php

Please advise on what I can do to set this up.

Thank you.

Rapid account: Fcambus
fcambus Commented 8 years ago

Hello,

If you were using Telize public API, you will just need to replace http://www.telize.com by https://telize-v1.p.mashape.com and append your token as an URL parameter.

For example, http://www.telize.com/geoip should be replaced by : https://telize-v1.p.mashape.com/geoip?mashape-key=YourMashapeSecretkey

More information about authentication methods can be found here : http://docs.mashape.com/auth-settings

Regards.

Join in the discussion - add comment below:

Login / Signup to post new comments