Coder Social home page Coder Social logo

HTTPError: 401 Client Error: Unauthorized for url: https://api.twitter.com/2/users/by/username/retroscifiart?user.fields=pinned_tweet_id about pleroma-bot HOT 7 CLOSED

robertoszek avatar robertoszek commented on August 18, 2024
HTTPError: 401 Client Error: Unauthorized for url: https://api.twitter.com/2/users/by/username/retroscifiart?user.fields=pinned_tweet_id

from pleroma-bot.

Comments (7)

vserbu avatar vserbu commented on August 18, 2024 1

You were right! I recreated API key and it is working. Another question, last time I had a visibility problem and you solved it with so RC version (1.0.3rc3: pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.0.3rc3) but this link is not working any more.

from pleroma-bot.

vserbu avatar vserbu commented on August 18, 2024 1

Tnx, I think it is working :)

from pleroma-bot.

vserbu avatar vserbu commented on August 18, 2024

This is my config.yml
...
pleroma_base_url: https://salocha.online
max_tweets: 10
twitter_token: xxx
users:

  • twitter_username: retroscifiart
    pleroma_username: Retroscifiart
    pleroma_token: xxx
    visibility: "public"

from pleroma-bot.

vserbu avatar vserbu commented on August 18, 2024

I'm not sure about pleroma_token is it access token when using step 3 from here: https://tinysubversions.com/notes/mastodon-bot/ (there is access token and refresh token).

from pleroma-bot.

robertoszek avatar robertoszek commented on August 18, 2024

I'm not sure about pleroma_token is it access token when using step 3 from here: https://tinysubversions.com/notes/mastodon-bot/ (there is access token and refresh token).

Yeah, pleroma_token's value should be the value of the access_token:
https://robertoszek.github.io/pleroma-bot/gettingstarted/beforerunning/#fediverse-tokens

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.twitter.com/2/users/by/username/retroscifiart?user.fields=pinned_tweet_id&expansions=pinned_tweet_id&tweet.fields=entities

However, it looks like the issue it's with the twitter_token, for whatever reason.
Is it the same token that was working before? Please check there are no trailing spaces or something along those lines.

I've been trying to reproduce it with my tokens and the Twitter user you provided and so far I've not been able to run into a HTTP 401.

It could be potentially an issue on Twitter's side: https://twittercommunity.com/t/401-unauthorized-response-when-using-client-search-all-tweets-tweepy/169478

You can try regenerating your Twitter tokens on the developer portal and see if that makes any difference, make sure your project also has Elevated access.

from pleroma-bot.

robertoszek avatar robertoszek commented on August 18, 2024

There has been some further fixes, the latest release candidate is 1.0.3rc10:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.0.3rc10

An stable release should be coming out soon but you can try running 1.0.3rc10 until then.

from pleroma-bot.

robertoszek avatar robertoszek commented on August 18, 2024

Great! If you run into any other problems, feel free to open a new issue. I'll close this one for now.
Have a nice day!

from pleroma-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.