Skip to content

fix(instagram): replace broken web_profile_info with signup-attempt endpoint#328

Merged
kaifcodec merged 1 commit intokaifcodec:mainfrom
anonymort:fix/instagram-username-scan
Apr 24, 2026
Merged

fix(instagram): replace broken web_profile_info with signup-attempt endpoint#328
kaifcodec merged 1 commit intokaifcodec:mainfrom
anonymort:fix/instagram-username-scan

Conversation

@anonymort
Copy link
Copy Markdown
Contributor

Summary

  • Bug: Instagram's web_profile_info API endpoint now returns 401 Unauthorized for all unauthenticated requests, causing every Instagram username scan to fail with [401] Status didn't match
  • Fix: Switch to the signup-attempt endpoint (web_create_ajax/attempt), which reliably reports whether a username is taken without requiring authentication
  • Approach: POST a registration attempt with just the username — Instagram's response includes a username error with code username_invalid or username_is_taken if the name is taken, and no username error if it's available. CSRF validation only checks that the header matches the cookie value, so a dummy token ("0") works without an extra preflight request

Test plan

  • Verified known taken usernames (instagram, cristiano, bonniebop) report Found
  • Verified non-existent usernames (xyznonexistent99999) report Not Found
  • Verified full CLI works end-to-end: user-scanner -u <name> -m instagram
  • Single HTTP request per check (no setup/teardown overhead)

🤖 Generated with Claude Code

…attempt check

The web_profile_info API now returns 401 for all unauthenticated requests,
breaking Instagram username scanning entirely. Switch to the signup-attempt
endpoint (web_create_ajax/attempt) which reliably indicates username
availability without requiring authentication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anonymort
Copy link
Copy Markdown
Contributor Author

Verified this fix works end-to-end — ran a bulk scan of 41 usernames and Instagram checks returned correct results for all of them (e.g. bonniebop, bonniebean, missbonnie all correctly reported as Found). The signup-attempt endpoint is reliable without authentication. Ready to merge.

Copy link
Copy Markdown
Owner

@kaifcodec kaifcodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anonymort Thanks for the update, this approach is more reliable as it directly checks the username availability using the account creation flow.

@kaifcodec kaifcodec merged commit 979ae81 into kaifcodec:main Apr 24, 2026
2 checks passed
@kaifcodec kaifcodec added bug fix Fixed a bug in existing files enhancement New feature or request labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Fixed a bug in existing files enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants