Closed sami-sage closed 4 years ago
+1 Same issue here, looks like tiktok changed something with the signature again.
Nothing has been changed, browser.js is still creating correct signatures for me.
@sami-sage @anpato What you're doing wrong is including the '&_signature=' bit when calling browser.js, this is wrong and will result in a token that only returns empty responses. You're supposed to exclude that part during signature creation and add it when you're making an HTTP request to that endpoint.
Thank you very much @GodsWithin I checked the way you mentioned and it worked like a charm. Only issue is, the token seems to be expiring after some time and we need to get the token again by stopping the server and restarting it by doing
node server.js
@sami-sage I just wrote a dirty bash script to do that for me.
Do note that it can happen from time to time that it fails to restart, therefor I advice you to store the previously used non-empty/non-whitespace signature result so that your application doesn't fail when the server is down for 4 hours.
Thank you gentlemen! Interestingly enough it worked prior without sending &_signature before.
@sami-sage I just wrote a dirty bash script to do that for me.
Do note that it can happen from time to time that it fails to restart, therefor I advice you to store the previously used non-empty/non-whitespace signature result so that your application doesn't fail when the server is down for 4 hours.
Thanks @GodsWithin , I will try this
Hi, I am trying to get
_signature
for two endpointsand
I cloned your repo and started server
and tried to run both these scripts
signature.js
andbrowser.js
with endpoint.and
I am getting the signature back but when I am hitting the request through curl with same signature with the endpoint, I am getting this response
While hitting through curl I am using the same user-agent as it is there in
browser.js
orsignature.js
. Any idea I am doing something wrong? Your help will be highly appreciated.