Struggling to get the correct MS Token #1115
-
I'm trying to run the basic example provided to test the API. I went on TikTok -> developer tools and have tried using many different types of MS token. In most cases, it just returns nothing, and twice it gave me EmptyResponseException(result, "TikTok returned an empty response"). I think I'm struggling to see which MS token is from "my" cookies on TikTok - the msToken in storage -> cookies changes every 10-ish seconds, so I'm not sure if it's that one but I'm doing something wrong as it keeps changing? The other tokens I tried were in the "network" tab, and as said most of the time it runs the script and nothing happens. This is the example:
I can see other questions in similar vein but most seem to say find the token in developer tools - which I am, but I'm not sure if I'm grabbing the wrong one or doing something else wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try to replace await api.create_sessions(ms_tokens=[ms_token], num_sessions=1, sleep_after=3) with await api.create_sessions(headless=False, ms_tokens=[ms_token], num_sessions=1, sleep_after=3) |
Beta Was this translation helpful? Give feedback.
Try to replace
with