@joncipriano, I have tried using both APIs(GET account/verify_credentials, POS direct_messages/events/new) and it is working.
- twurl & postman for verify_credentials.
- twurl for POST direct_messages.
However, I could get the same issue with webhooks.“Could not authenticate you.”
I have used below script with appropriate keys and callback url but no luck. Please let me know your thoughts. Could you please verify my access as well.
var request = require(‘request’)
// twitter authentication
var twitter_oauth = {
consumer_key: ‘’,
consumer_secret: ‘’,
token: ‘’,
token_secret: ‘’
}
var WEBHOOK_URL = ‘’
// request options
var request_options = {
url: ‘https://api.twitter.com/1.1/account_activity/webhooks.json’,
oauth: twitter_oauth,
headers: {
‘Content-type’: ‘application/x-www-form-urlencoded’
},
form: {
url: WEBHOOK_URL
}
}
// POST request to create webhook config
request.post(request_options, function (error, response, body) {
console.log(body)
})
Thanks,
Ramesh.