Telize

BEZAHLT
Durch Frederic Cambus | Aktualisiert 17 days ago | Location
Popularität

9.8 / 10

Latenz

83ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

help transitioning from free to paid

Rapid account: Jlarkin 353
jlarkin353
8 years ago

Hi, I dont suppose you could help me fix my code that was using this api to detect visitors from certain areas and redirect them to appropriate localised ecommerce stores? It was working great for us in the past and happy to pay for it now but I need a bit of help fixing it as I dont see any ajax support in the docs.

Here is my legacy code (from gb.moocall.com)

{
$.ajax( {
url: ‘http://www.telize.com/geoip’,
type: ‘POST’,
dataType: ‘jsonp’,
success: function(location) {
var cc = location.country_code;
var country = “”;
var redirectUrl = “”;
var nationality = “”;
if(location.country_code===“US”)
{
country = “the USA”;
redirectUrl = “http://us.moocall.com”;
nationality = “an American”;
cc = “https://cdn.shopify.com/s/files/1/0884/6088/files/united_states_of_america_flag_background_256.png?1824814456720756435”;
}
if(location.country_code===“CA”)
{
country = “Canada”;
redirectUrl = “http://us.moocall.com”;
nationality = “a North American”;
cc = “https://cdn.shopify.com/s/files/1/0884/6088/files/canada_flag_background_256.png?1824814456720756435”;
}

I basically need to know what do i change the URL to and how do I pass in the key that I now need as a paid user to have it continue to work.
Any help appreciated!
John

Rapid account: Jlarkin 353
jlarkin353 Commented 8 years ago

That’s great, I have it back up and running now. Thanks for your help!

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

You can find your key in the documentation tab, check the example API calls and search for “X-Mashape-Key” to get your key.

For information, all authentication methods are detailed here : http://docs.mashape.com/auth-settings

Hope this helps!

Regards.

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen