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

Twitter route stopped working? (Username+password login) #17089

Closed
1 task done
D0peCrack opened this issue Oct 11, 2024 · 3 comments · Fixed by #17166
Closed
1 task done

Twitter route stopped working? (Username+password login) #17089

D0peCrack opened this issue Oct 11, 2024 · 3 comments · Fixed by #17166
Labels
RSS bug Something isn't working

Comments

@D0peCrack
Copy link

Routes

/twitter/user/:id/:routeParams?

Full routes

twitter/user/elonmusk/readable=0&authorNameBold=0&showAuthorInTitle=1&showAuthorInDesc=0&showSymbolForRetweetAndReply=0&showRetweetTextInTitle=0&addLinkForPics=1&&heightOfPics=200

Related documentation

normal rsshub docs

What is expected?

return elon musk twitter info

What is actually happening?

Error Message:
FetchError: [POST] "https://api.x.com/1.1/onboarding/task.json": 403 Forbidden

Route: /twitter/user/:id/:routeParams?

Deployment information

Self-hosted

Deployment information (for self-hosted)

No response

Additional info

Could anyone check it. 
My setup worked like 2 weeks ago. 
i signup via username and password
currently it doesnt work

This is not a duplicated issue

  • I have searched existing issues to ensure this bug has not already been reported
@D0peCrack D0peCrack added the RSS bug Something isn't working label Oct 11, 2024
Copy link
Contributor

Searching for maintainers:

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.
如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

@D0peCrack
Copy link
Author

and my ip is not blocked and i can sign in to my account with no problem

@murichazuke
Copy link

The 403 error came from AccountDuplicationCheck, and it looks like LoginEnterPassword now returns tokens. I made some changes, and the login was successful.

diff --git a/lib/routes/twitter/api/mobile-api/login.ts b/lib/routes/twitter/api/mobile-api/login.ts
index 1e4c4570f..7aceffb53 100644
--- a/lib/routes/twitter/api/mobile-api/login.ts
+++ b/lib/routes/twitter/api/mobile-api/login.ts
@@ -133,6 +133,11 @@ async function login({ username, password, authenticationSecret }) {
                     },
                 });
                 logger.debug('Twitter login 4 finished: LoginEnterPassword.');
+                for (const subtask of task3.data?.subtasks || []) {
+                    if (subtask.open_account) {
+                        return subtask.open_account;
+                    }
+                }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RSS bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants