sumithemmadi / truecallerjs

TruecallerJS: This is a library for retrieving phone number details using the Truecaller API.
http://truecaller.js.org/
MIT License
506 stars 105 forks source link

Request failed with status code 426 #52

Open Dragonizedpizza opened 1 year ago

Dragonizedpizza commented 1 year ago
$ truecallerjs -s +9199123456789 --json
{
  "message": "Request failed with status code 426",
  "name": "AxiosError",
  "stack": "AxiosError: Request failed with status code 426\n    at settle (file:///usr/local/lib/node_modules/truecallerjs/node_modules/axios/lib/core/settle.js:19:12)\n    at Unzip.handleStreamEnd (file:///usr/local/lib/node_modules/truecallerjs/node_modules/axios/lib/adapters/http.js:572:11)\n    at Unzip.emit (node:events:523:35)\n    at endReadableNT (node:internal/streams/readable:1367:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)",
  "config": {
    "transitional": {
      "silentJSONParsing": true,
      "forcedJSONParsing": true,
      "clarifyTimeoutError": false
    },
    "adapter": "http",
    "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 XXX"
    },
    "params": {
      "q": "99123456789",
      "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": 426
}
lonelypx commented 1 year ago

invalid number format "q": "99123456789",

Dragonizedpizza commented 1 year ago

invalid number format "q": "99123456789",

this is the command shown in the readme

sumithemmadi commented 11 months ago

similar to #32