-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
[INSTALLATION] - Question about Obtaining and Configuring ms_token in the Project #1109
Comments
It's a cookie that comes from the TikTok website. |
@jpratt9 it seems like sometimes the package works even while setting the ms_token to be something generic like "ms_token". Is an actual ms_token from the TikTok cookies necessary? |
if you look through the other issues, you can find that there's ways around using it but i haven't tried setting it to a placeholder value like that. the value in the TikTok site's cookies will be "msToken" |
@jpratt9 it seems like the msToken within the TikTok site's cookies is rapidly changing. Do you go in and replace the ms_token every time you run your script? |
nope haven't changed it at all and it seems to work fine. although i can't get user.videos to work at all. trending, user.info, comments etc all seem to work fine but user.videos doesn't work at all & it looks like others can't get it to work either. please let us know if you figure out how to get it working! |
I'm experiencing similar issues with functionalities like comment, hashtag, search, and trending. The only functionality that seems to be working is video_example.py (without the need for ms_token). Do you think the codebase of this project might be outdated? |
It appears that many other people are having the same exact error (#1090). What I have not figured out is why sometimes the code works, and sometimes it does not. And how the issue can be fixed/worked around. |
https://developers.tiktok.com/doc/tiktok-api-v1-video-list/ here's the TikTok API "list videos" endpoint the code should be hitting under user.videos, but it seems to be hitting "https://www.tiktok.com/api/post/item_list" instead of the correct "https://open-api.tiktok.com/video/list/". Maybe that's why all these endpoints intermittently work? Old URLs? see https://github.com/davidteather/TikTok-Api/blob/main/TikTokApi/api/user.py#L122-L127 |
@davidteather can you advise? i'm happy to make a PR fixing this if this turns out to be the issue |
If that is truly the issue (which I am not educated enough to uphold), I would wholeheartedly appreciate you fixing it! @jpratt9 |
Hi - reviving this thread as I am having a similar issue. I can make the first example of finding trending videos work, looking for hashtags returns an empty response. Would be great to know if this is an issue with the set ms_token or codebase? |
im having the same issue |
"Hi there! I noticed in the code that ms_token is used, but I couldn't find where it's obtained or where it's set in the project. Could you please provide guidance on how to obtain the ms_token and where it should be configured within the project?"
Thanks!
The text was updated successfully, but these errors were encountered: