Hello all,
I’m trying to access twitter’s 30 day endpoint. I’m using an npm package called ‘twitter.’ It works fine when accessing the standard endpoint, but when I try to access the 30 day endpoint, I receive: HTTP Error: 422 Unprocessable Entity. My main script:
const Twitter = require('twitter');
const config = require('./config_twitter_bearer')
const client = new Twitter(config);
const params = {
query: '#selfie',
maxResults: 100
}
function getTweets (builderString, counter) {
client.post('tweets/search/30day/Dev', params).then(function (result) {
console.log(result)
}).catch((err) => {console.log("err: ", err)})
}
And in my config_twitter_bearer.js:
module.exports = {
bearer_token: "AAAAAAAAAAAAAAAAAAAA..." //redacted
}
Is this an authentication issue?