Use a Twitter developer app you've created to send API requests
module.exports = defineComponent({
props: {
twitter_developer_app: {
type: "app",
app: "twitter_developer_app",
}
},
async run({steps, $}) {
const Twit = require('twit')
const { api_key, api_secret_key, access_token, access_token_secret } = this.twitter_developer_app.$auth
const T = new Twit({
consumer_key: api_key,
consumer_secret: api_secret_key,
access_token,
access_token_secret,
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests.
strictSSL: true, // optional - requires SSL certificates to be valid.
})
return await T.get('account/verify_credentials', { skip_status: true })
},
})
With Schedule - A trigger provided by Pipedream - You can easily build
automated workflows that run on regular times or intervals. Some examples of
things that you can build using the Schedule API include: