truecallerjs icon indicating copy to clipboard operation
truecallerjs copied to clipboard

Unable to search phone number

Open sujoyg1982 opened this issue 1 year ago • 7 comments

I have been trying to follow the guide mentioned in the github project of truecallerjs node library and search a phone number without any success.

I have installed the npm package in my node environment that is running in an ubuntu machine. I have logged in using my phone number and otp well and got an installation Id too. But while doing search, I have been constantly getting 429 response code that said "ERR_BAD_REQUEST". Any idea why is this happening? Do I need to register my mobile number somewhere TC portal?

Below is the command and response sample.

truecallerjs -s +91 --json { "message": "Request failed with status code 429", "name": "AxiosError", "stack": "AxiosError: Request failed with status code 429\n at settle (file:///usr/lib/node_modules/truecallerjs/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///usr/lib/node_modules/truecallerjs/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:530:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (file:///usr/lib/node_modules/truecallerjs/node_modules/axios/lib/core/Axios.js:45:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async runCLI (file:///usr/lib/node_modules/truecallerjs/dist/cli.js:236:35)", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "adapter": [ "xhr", "http", "fetch" ], "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": {}, "headers": { "Accept": "application/json, text/plain, /", "Content-Type": "application/json; charset=UTF-8", "accept-encoding": "gzip", "user-agent": "Truecaller/11.75.5 (Android;10)", "Authorization": "Bearer a1i08--nlqKNu-5-gztqiQ-NQMDWOIX3XE-lbsYjqub9H1n5bdcClRX9T7KFvmFp" }, "params": { "q": "", "countryCode": "IN", "type": 4, "locAddr": "", "placement": "SEARCHRESULTS,HISTORY,DETAILS", "encoding": "json" }, "method": "get", "url": "https://search5-noneu.truecaller.com/v2/search" }, "code": "ERR_BAD_REQUEST", "status": 429

sujoyg1982 avatar Jul 06 '24 04:07 sujoyg1982

Same

gittyari avatar Jul 09 '24 14:07 gittyari

@sumithemmadi

gittyari avatar Jul 09 '24 14:07 gittyari

Same

BEST-COADER-ISHAAN avatar Jul 19 '24 10:07 BEST-COADER-ISHAAN

same issue

priyankarpal avatar Jul 28 '24 14:07 priyankarpal

same. I think true caller API dead....

MaxBiz100 avatar Jul 29 '24 01:07 MaxBiz100

For me the error code is different, message: Request failed with status code 401, this means unauthorized access. So I guess Truecaller must have moved this api's access to it's business category only, and not to open public usage. Error code 429 means Too many request, so I guess some dev might have pushed it to prod, later they changed it to 401 for Unauthorized. @sujoyg1982 would you try again to check the error code once.

slow-codex avatar Jul 29 '24 03:07 slow-codex

"message": "Request failed with status code 429", "name": "AxiosError", "stack": "AxiosError: Request failed with status code 429\n at settle (file:///C:/Users/Home/AppData/Roaming/npm/node_modules/truecallerjs/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///C:/Users/Home/AppData/Roaming/npm/node_modules/truecallerjs/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (file:///C:/Users/Home/AppData/Roaming/npm/node_modules/truecallerjs/node_modules/axios/lib/core/Axios.js:45:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async runCLI (file:///C:/Users/Home/AppData/Roaming/npm/node_modules/truecallerjs/dist/cli.js:236:35)", i have face this issue any another options for looukup name

fenizo avatar Aug 13 '24 14:08 fenizo