user-1
(User 1)
June 22, 2023, 9:29am
21
@Leo , unfortunately I think there is still something wrong.
After just a few steps I started getting “too many requests” error.
I didn’t experience it with the previous version of the Twitter App so I am assuming it has to do with the recent update.
I also think it is now using twitter v2 API vs v 1.1 before
Anyway - that is not possible that I am out reached a quota after sending 3 tweets
user-1
(User 1)
June 22, 2023, 9:29am
22
the error means you have reached the Twitter API limit for the duration
user-1
(User 1)
June 22, 2023, 9:29am
23
How could I reach limit after sending 3 tweets?
user-1
(User 1)
June 22, 2023, 9:29am
24
This is more on Twitter side, they changed their free tier rate limit
user-1
(User 1)
June 22, 2023, 9:29am
25
I am loooking at that and it is 50
user-1
(User 1)
June 22, 2023, 9:29am
26
I experienced this before, they limit 3 tweet in 1-2 hours I think
user-1
(User 1)
June 22, 2023, 9:29am
27
I had no issues with many tests before the change
user-1
(User 1)
June 22, 2023, 9:29am
28
v2 is the API tier that Twitter is pushing the clients to use. They recently changed their rate tier on that
user-1
(User 1)
June 22, 2023, 9:29am
29
The pipedream action send one request to Twitter for each of your test, Pipedream has nothing to do with your rate request.
I think what I would suggest you is to upgrade to Twitter Basic or Pro plan. Or wait before you post a new tweet
user-1
(User 1)
June 22, 2023, 9:29am
30
Can’t afford 100USD a month to send 5 tweets a day, I need solution to send with v 1.1. As the upload media step works (is it using V1.1?) can I use a custom code step to send tweet with V1.1 instead of pipedream updated send tweet action which moved to v2?
user-1
(User 1)
June 22, 2023, 9:29am
31
I think the Pipedream bot can help you with that
user-1
(User 1)
June 22, 2023, 9:29am
32
How can I use a custom code step to send tweet with V1.1 instead of pipedream updated send tweet action which moved to v2?
user-1
(User 1)
June 22, 2023, 9:29am
33
You can use a custom code step to send a tweet using Twitter API v1.1. First, make sure you have the required Twitter API credentials (API key, API secret key, access token, and access token secret). Then, you can use the following custom code step in your Pipedream workflow: ``` import { axios } from “@pipedream /platform”; import qs from “qs”; export default defineComponent({ props: { status: { type: “string”, label: “Tweet Content”, }, apiKey: { type: “string”, label: “API Key”, }, apiSecretKey: { type: “string”, label: “API Secret Key”, }, accessToken: { type: “string”, label: “Access Token”, }, accessTokenSecret: { type: “string”, label: “Access Token Secret”, }, }, async run({ $ }) { const apiUrl = “https://api.twitter.com/1.1/statuses/update.json ”; const authHeader = OAuth oauth_consumer_key="${this.apiKey}",oauth_token="${this.accessToken}",oauth_signature_method="HMAC-SHA1",oauth_timestamp="${Math.floor( Date.now() / 1000 )}",oauth_nonce="${Math.random() .toString(36) .substring(2)}",oauth_version="1.0"
; const signatureBaseString = POST&${encodeURIComponent( apiUrl )}&${encodeURIComponent(
oauth_consumer_key=${this.apiKey}&oauth_nonce=${authHeader.match( /oauth_nonce=“([^”])“/ )[1]}&oauth_signature_method=HMAC-SHA1&oauth_timestamp=${authHeader.match( /oauth_timestamp=”([^"] )"/ )[1]}&oauth_token=${this.accessToken}&oauth_version=1.0&status=${encodeURIComponent( this.status )} )}
; const signingKey = ${encodeURIComponent( this.apiSecretKey )}&${encodeURIComponent(this.accessTokenSecret)}
; const crypto = require(“crypto”); const oauthSignature = crypto .createHmac(“sha1”, signingKey) .update(signatureBaseString) .digest(“base64”); const authHeaderWithSignature = ${authHeader},oauth_signature="${encodeURIComponent( oauthSignature )}"
; const response
user-1
(User 1)
June 22, 2023, 9:29am
34
custom code will not work. So after all this back and forth I ended up being in worse situation than I’ve been before. I was able to post tweets without media, now I can upload media, but can’t post tweets, so I am screwed. Well…