Skip to content

Commit a45227b

Browse files
authored
Add user-agent to guest_token request (#1359)
1 parent a92e79e commit a45227b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/get_session.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def auth(username, password, otp_secret):
2121

2222
guest_token = requests.post(
2323
"https://api.twitter.com/1.1/guest/activate.json",
24-
headers={'Authorization': bearer_token}
24+
headers={
25+
'Authorization': bearer_token,
26+
"User-Agent": "TwitterAndroid/10.21.0-release.0 (310210000-r-0) ONEPLUS+A3010/9"
27+
}
2528
).json().get('guest_token')
2629

2730
if not guest_token:

0 commit comments

Comments
 (0)