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

Twitter Bearer Token - 403 Fails #1037

Closed
Btibert3 opened this issue Feb 24, 2024 · 3 comments
Closed

Twitter Bearer Token - 403 Fails #1037

Btibert3 opened this issue Feb 24, 2024 · 3 comments

Comments

@Btibert3
Copy link

Btibert3 commented Feb 24, 2024

Describe the bug
The error response thrown inside Orange from Twitter suggests that the use of Bearer token is no longer the viable way of connecting to the API.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure the Text Add-On is installed and updated
  2. Add the Twitter widget to the canvas
  3. Double-click the widget, and add a valid bearer token for your application/project from the Twitter developer dashboard
  4. Enter a search phrase

Expected behavior
The widget authenticates and searches for tweets per the settings.

Actual behavior
The following error message:

Api error: 403 Forbidden When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.. Check if your API plan includes Tweets retrieval. The free plan doesn't allow Tweets retrieval anymore.

Orange version:
3.36.2

Text add-on version:
1.15.0

Screenshots
image

Operating system:
MacOS 14.3.1

Additional context
The documentation doesn't show adding a bearer token, but a key and a secret, which aligns to the error thrown. https://orange3-text.readthedocs.io/en/latest/widgets/twitter-widget.html (Step 1 image is different from what is actually in the library).

@PrimozGodec
Copy link
Collaborator

What type of account do you have? If you have a free account version, it is not possible to download any tweets. #995

@Btibert3
Copy link
Author

It is a free account, but would that impact the fact that the error thrown suggests a bearer token should not be used? If bearer is accepted for non-free accounts than please feel free to close this issue.

@PrimozGodec
Copy link
Collaborator

I know the message could be better, but it is what Tweeter API throws, so we do not have any control here. This is also why we added the last sentence of the message that the plan may be wrong. According to the conversation here, xdevplatform/Twitter-API-v2-sample-code#58 bearer is accepted with any account, but with the Free plan, you cannot download tweets.

This widget was developed before the API changed, and getting tweets without a paid account was possible. Now, it is pretty useless since it is costly to get any plan.

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