/ kpgarrod
Discussions
8
AllQuestionsAnswers
arrowNewest
a14Thank you for pointing out the api key and please excuse my stupidity! I really thought I had used this code on my staging system previously but it seems I must have been mistaken. It obviously worked on my localhost because that is where I am! Anyway, it is now working correctly and I'm sorry to have wasted your time.
Fri 12:5729/1/16
a14yes
Fri 12:1129/1/16
a14No, I didn't change the API call. This is what it looks like: unirest.get("https://telize-v1.p.mashape.com/geoip") .header("X-Mashape-Key", "myKey") .header("Accept", "application/json") .end((result) => { console.log(`result from mashape: ${JSON.stringify(result)}`)
Fri 11:4029/1/16
a14that's UTC+2, so time is now
Fri 10:1329/1/16
a14Jan 29 12:10:29 result from mashape: {"statusCode":200,"body":{"offset":"-4","longitude":-77.4838,"city":"Ashburn","timezone":"America/New_York","latitude":39.0335,"area_code":"0","region":"Virginia","dma_code":"0","organization":"AS14618 Amazon.com, Inc.","country":"United States","ip":"54.158.120.193","country_code3":"USA","postal_code":"20147","continent_code":"NA","country_code":"US","region_code":"VA"},"headers":{"access-control-allow-origin":"*","cache-control":"no-cache","content-type":"application/json; charset=utf-8","date":"Fri, 29 Jan 2016 10:10:29 GMT","server":"Mashape/5.0.6","x-ratelimit-requests-limit":"1000","x-ratelimit-requests-remaining":"947","content-length":"350","connection":"Close"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"telize-v1.p.mashape.com","port":443,"hostname":"telize-v1.p.mashape.com","hash":null,"search":null,"query":null,"pathname":"/geoip","path":"/geoip","href":"https://telize-v1.p.mashape.com/geoip"},"method":"get","headers":{"X-Mashape-Key":"ladt9aLl8amshlCarxuLVHrbwnajp1bYJW1jsnrmNgMMKHu7GS","Accept":"application/json","content-length":0}}}
Fri 10:1229/1/16
a14@fcambus: How will this issue be prevented in future please?
Fri 9:5329/1/16

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication