truecallerjs
truecallerjs copied to clipboard
search not working
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'search5-noneu.truecaller.com',
'path': '/v2/search?countryCode=IN&type=4&placement=SEARCHRESULTS,HISTORY,DETAILS&encoding=json&q=+91xxxxxxxxxx',
'headers': {
'Content-Type': 'application/json; charset=UTF-8',
'User-Agent': 'Truecaller/14.1.6 (Android;14)',
'Authorization': 'Bearer a2i9P--mK24dz-5-e-Mbhu0GFhbShT11wvf7ivkiGWI_t7uA3oAe1LYWD7ESinO8'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Response { "status": 42601, "message": "Client must be upgraded" }