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

x/build/internal/task: update postTweet to Twitter API v2 when possible #53282

Open
dmitshur opened this issue Jun 8, 2022 · 4 comments
Open
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Jun 8, 2022

The tweet task currently uses Twitter API v1.1. We can't fully update to Twitter API v2 because the media endpoints aren't available there yet. This is the tracking issue for updating when it's possible.

See:

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 8, 2022
@dmitshur dmitshur added this to the Unreleased milestone Jun 8, 2022
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Jun 8, 2022
@dmitshur dmitshur self-assigned this Jun 21, 2023
@dmitshur
Copy link
Contributor Author

dmitshur commented Jun 21, 2023

Recent relevant development:

Notably, attempting to POST to /1.1/statuses/update.json no longer works as before.
So that needs to move to v2 sooner, even if the media endpoint stays on v1.1.

CC @golang/release.

@gopherbot
Copy link

Change https://go.dev/cl/506335 mentions this issue: internal/task: use Twitter API v2 endpoint for posting tweets

gopherbot pushed a commit to golang/build that referenced this issue Jun 26, 2023
The Free access tier doesn't support v1.1 endpoint for managing
tweets anymore, it only supports v2 endpoint. Tested in staging.

For golang/go#53282.

Change-Id: I3c3cbe9a1acb2209af04695f9884c4c175f4c992
Reviewed-on: https://go-review.googlesource.com/c/build/+/506335
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@cherrymui
Copy link
Member

Even with the CL above, Twitter still reject it

POST /2/tweets: non-201 Created status code: 403 Forbidden body: "{\"client_id\":\"22321744\",\"detail\":\"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. ...

@heschi
Copy link
Contributor

heschi commented Jul 11, 2023

Added it to a project. Success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Planned
Development

No branches or pull requests

4 participants