Skip to content

Maintenance: Dependency Upgrades, API Fixes, and Documentation Update#157

Open
anonymousraft wants to merge 1 commit intosumithemmadi:mainfrom
anonymousraft:main
Open

Maintenance: Dependency Upgrades, API Fixes, and Documentation Update#157
anonymousraft wants to merge 1 commit intosumithemmadi:mainfrom
anonymousraft:main

Conversation

@anonymousraft
Copy link

This PR addresses critical maintenance issues, upgrades outdated dependencies to their latest stable versions, and updates the documentation to accurately reflect the current state of Truecaller API access.

Dependency Upgrades

  • Upgraded inquirer to v13 (from v8).
  • Upgraded chalk to v5 (from v4).
  • Upgraded awesome-phonenumber to v7 (from v2).
  • Upgraded json-colorizer to v3 (from v2).
  • Addressed all breaking changes resulting from these upgrades, specifically the named exports and option format changes in json-colorizer v3 and ESM-only constraints.

API & Logic Code Fixes

  • Status Code Handling: Updated src/cli.ts to accept Status 20003 as a success response for login (previously only accepted 1, 2, or 9).
  • Endpoint Configuration: Updated login and search endpoints to account-noneu and search5-noneu for improved reachability.
  • Request Utility: Created src/utils/request.ts to centralize Axios configuration, ensuring consistent User-Agent (Truecaller/12.0.0 Android) and headers across all requests.
  • Device Profiling: Updated src/login.ts to use a realistic Xiaomi device profile for OTP requests, replacing the previous random string generation to reduce spam flags.

Documentation

  • Critical Notice: Updated README.md to transparently warn users about server-side OTP blocking/delivery failures for unofficial clients.
  • Workaround Guide: Removed ineffective CLI workarounds and added specific, technical steps for manually extracting the installationId via Truecaller Web network inspection.
  • Code Comments: Added JSDoc and inline comments to src/cli.ts, src/login.ts, and src/search.ts for better maintainability.

Known Limitations

Despite these fixes ensuring the client sends technically correct requests (receiving 20003 Success from the API), Truecaller's backend appears to be silently blocking SMS delivery for requests originating from this library. The documentation has been updated to reflect this reality and mark the automated login feature as deprecated/non-functional.

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

Successfully merging this pull request may close these issues.

1 participant