Telize

付费
通过 Frederic Cambus | 已更新 17日前 | Location
人气

9.8 / 10

延迟

83ms

服务等级

100%

Health Check

N/A

返回所有讨论

help transitioning from free to paid

Rapid account: Jlarkin 353
jlarkin353
8年前

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年前

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

Rapid account: Fcambus
fcambus Commented 8年前

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.

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论