-
Hi!👋 I am trying to follow this example: I only have access to API v2, so I replaced method v1 with v2, but I get this error: "Authenticating with OAuth 2.0 Application-Only is forbidden for this endpoint. Supported authentication types are [OAuth 1.0a User Context, OAuth 2.0 User Context]." I have tried instantiating the client in different ways, but it doesn't work😓 https://gist.github.com/camiaei/41845bb517da261dc15a51218957e4a2 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi 👋 ! On the other side, reply to a tweet requires a client with user-context authentication... 😄 So, you need to have two different clients: |
Beta Was this translation helpful? Give feedback.
Hi 👋 !
As specified in twitter documentation, stream endpoint only supports v2 app-only authentication.
On the other side, reply to a tweet requires a client with user-context authentication... 😄
So, you need to have two different clients:
One client with a bearer token (your first tentative) to use tweet stream, and the other client (your second one), with user-context (in your case, OAuth 1.0a access tokens) to reply to tweet !