Hello,
I'm having trouble setting up my API via RapidAPI... I've followed the instructions here
https://community.alteryx.com/t5/Engine-Works-Blog/REST-API-In-5-Minutes-No-Coding/ba-p/8137
and had no problem setting up that API; however, I'm clearly doing something wrong with Rapid API as I keep getting 'invalid API Key'. Yes, the key is correct as I can run it through Rapid API's website.
What am I doing wrong?
var unirest = require("unirest");
var req = unirest("GET", "https://hotels4.p.rapidapi.com/properties/list");
req.query({
"destinationId": "1506246",
"pageNumber": "1",
"checkIn": "2020-01-08",
"checkOut": "2020-01-15",
"pageSize": "25",
"adults1": "1",
"currency": "USD",
"locale": "en_US",
"sortOrder": "PRICE"
});
req.headers({
"x-rapidapi-key": "abc123",
"x-rapidapi-host": "hotels4.p.rapidapi.com",
"useQueryString": true
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});