Account Activity API register fail.
I did try to using oauth1.0a and application only authentication.
only received {“errors”:[{“code”:200,“message”:“Forbidden.”}]} response.
How can i solve it? I did submit form to use beta api.
My owner ID is 944934436537221121
var nconf = require('nconf')
var request = require('request')
// load config
nconf.file({ file: 'config.json' }).env()
var twitter_oauth = {
consumer_key: nconf.get('TWITTER_CONSUMER_KEY'),
consumer_secret: nconf.get('TWITTER_CONSUMER_SECRET'),
token: nconf.get('TWITTER_ACCESS_TOKEN'),
token_secret: nconf.get('TWITTER_ACCESS_TOKEN_SECRET')
}
var WEBHOOK_URL = 'my webhook url';
var request_options = {
url: 'https://api.twitter.com/1.1/account_activity/all/env-beta/webhooks.json',
oauth: twitter_oauth,
headers: {
'Content-type': 'application/x-www-form-urlencoded'
},
form: {
url: encodeURI(WEBHOOK_URL)
}
}
request.post(request_options, function (err, response, body) {
console.log(body)
})