Closed Aerglonus closed 11 months ago
I got it to work by changing the User-Agent
seems to respond with data again instead of the webpage.
from:
'User-Agent': Barcelona ${LATEST_ANDROID_APP_VERSION} Android
to :
'User-Agent': Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.199 Safari/537.36
but its breaking things like authentication, likes, etc. so this probably requires adding a new function like _getDefaultDesktopHeaders
and _requestDesktopQuery
that are used only on the methods that make requests the https://www.threads.net/api/graphql
since it appears that this endpoint is used in browsers or am I wrong?
These are two probably related issues.
When running
getToken
the reponse containsuserID
as undefinedAnd when using
getUserProfile
the reponse isuserData
undefined but investigating the actual response datares.data
is returns a web page instead.res.data.data.userData.user
andres.data.data.userData
returns undefined.Expected response :