Telize

유료
분류별 Frederic Cambus | 업데이트됨 16 days ago | Location
인기

9.8 / 10

지연 시간

83ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

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.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입