Skip to content

Commit

Permalink
Twitter v2 API now send back 201 on success
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidhu authored Oct 14, 2023
1 parent d017f17 commit 8f15be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infra/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def new_tweet(title, bounty, author, url, mention=False):
tweet_string = f"New Google VRP writeup \"{title}\" for a bounty of ${bounty_string} by {author_string}:\n{url}"
try:
r = twitter.post("https://api.twitter.com/2/tweets", json={"text": tweet_string})
if r.status_code == 200:
if r.status_code == 201:
return True
else:
print(f"[!] Twitter API call to '/2/tweets' failed:")
Expand Down

0 comments on commit 8f15be4

Please sign in to comment.