Skip to content
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

Way to use solely public APIs #32

Open
leehagoodjames opened this issue May 27, 2024 · 1 comment
Open

Way to use solely public APIs #32

leehagoodjames opened this issue May 27, 2024 · 1 comment

Comments

@leehagoodjames
Copy link

It would be great if there was an unauthenticated way of just viewing totally public information from truth social

@KonradIT
Copy link
Contributor

Turns out you can already, maybe this is a mistake on TS' part, but

requests.get(
    "https://truthsocial.com/api/v1/accounts/107780257626128497/statuses?exclude_replies=true&with_muted=true",
    headers={
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0",
        "Accept": "application/json, text/plain, */*",
        "Accept-Language": "es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3",
        "Referer": "https://truthsocial.com/search?q=trump",
        "DNT": "1",
        "Sec-Fetch-Dest": "empty",
        "Sec-Fetch-Mode": "cors",
        "Sec-Fetch-Site": "same-origin",
    },
).json()

works and returns the JSON response. The same goes for some other endpoints I tried.

Truthbrush could be used without any account requirement, cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants