Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to search phone number #97

Open
sujoyg1982 opened this issue Jul 6, 2024 · 7 comments
Open

Unable to search phone number #97

sujoyg1982 opened this issue Jul 6, 2024 · 7 comments

Comments

@sujoyg1982
Copy link

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

@gittyari
Copy link

gittyari commented Jul 9, 2024

Same

@gittyari
Copy link

gittyari commented Jul 9, 2024

@sumithemmadi

@BEST-COADER-ISHAAN
Copy link

Same

@priyankarpal
Copy link

same issue

@MaxBiz100
Copy link

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

@slow-codex
Copy link

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.

@fenizo
Copy link

fenizo commented Aug 13, 2024

"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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants