Update:
I am using https://api.twitter.com/1.1/account_activity/all/dev/webhooks.json as the webhook URL.
It seems that environment is dev(from the environment dashboard). Can I even do Account Activity webhook using Dev environment?
Using Dev environment to Account Activity but on create webhook, getting following error:
{“code”:200,“message”:“Forbidden.”}
I see there are similar questions to mine, but I cant seem to get it to work from the responses.
Additional Info :
- I am using Node JS
- My callback URL is already configured in the App
- When I hit the callback URL from browser directly, I can see json response with response token:
{*response_token: “ynKdz4sadWhX6Q7G+8q6lKGMPtmF63fFxtibCSynsl4=”}
- Code I am using:
let crc_token = req.query[‘crc_token’];
console.log(“crc token:”,crc_token);
const consumer_secret = ‘’,
const hmac=crypto.createHmac(‘sha256’,consumer_secret).update(crc_token).digest(‘base64’);
console.log(hmac);
res.setHeader(‘Content-Type’,‘application/json’);
res.setHeader(‘charset’,‘utf-8’);
res.status(200).send({‘response_token’:hmac});
Can someone please help me point in right direction. I am badly struck at this.
Thanks!