Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

fix: methods failing because of token or headers #216

Merged
merged 1 commit into from Jul 19, 2023

Conversation

Aerglonus
Copy link
Contributor

The PR add new methods for some that do not require authentication and fixes the issues of not retrieving data. #188 and #175

Added

_getUnAuthenticatedHeaders

Reason
This was added because some methods that do not require the header Authorization were failing because of it.

Added

_getDefaultUserDataHeaders

Reason

Simply to pass the getUnAuthenticatedHeaders to methods that do not require authentication like getUserProfile getThreads getThreadsLikers

Added

_getDefaultRepliesHeaders  | _requestRepliesQuery 

Reason

The motive to add these two were because the referer header to the threads.net/api/graphql endpoint includes the /replies path when is not logged in.

Note :

getProfilePage and getUserIDfromUsername are still bugged

getProfilePage returns 404 Not Found html as response
getUserIDFromUsername returns Data: ' ' with error 429 too many requests when running by itself but when it works fine when running through getCurrentUserID

@vercel
Copy link

vercel bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
threads-api ⬜️ Ignored (Inspect) Jul 19, 2023 4:53am

Copy link
Owner

@junhoyeo junhoyeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍 got it

@junhoyeo junhoyeo merged commit de11569 into junhoyeo:main Jul 19, 2023
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants