Using Account Activity API



Hi everyone,

I’m getting:

{"errors":[{"code":32,"message":"Could not authenticate you."}]}

while trying to create a webhook using

  • My app has Read, Write and Access direct messages permissions.
  • I regenerated the token after changing the permissions and I’m using the new one.
  • My webhook handler does not gets any hit

I’m using this script(create-webhook-config.js from twitter-webhook-boilerplate-node):

var request = require('request')

// twitter authentication
var twitter_oauth = {
  consumer_key: '0IuI...',
  consumer_secret: '18Be...',
  token: '2845...',
  token_secret: 'JcM...'

var WEBHOOK_URL = ''

// request options
var request_options = {
  url: '',
  oauth: twitter_oauth,
  headers: {
    'Content-type': 'application/x-www-form-urlencoded'
  form: {
    url: WEBHOOK_URL

// POST request to create webhook config, function (error, response, body) {

Problem accessing account_activity web hooks

Have you been granted access to the Account Activity API by using one of the links at and providing your application ID from in the form?


Hi Andy, Thanks for response.

Yes, I’ve been granted access for 30-days trial premium access and I’ve set the app from


@andypiper I wanna ask you one question as this thread is relevant. Is Account Activity API: All Activities got the full set of activities includes Tweets, @mentions , Replies, Retweets , Quote Tweets , Retweets of Quoted Tweets , Likes, Direct Messages Sent , Direct Messages Received , Follows , Blocks , Mutes , Typing indicators and Read receipts ? ref:
I was looking here and it says only direct messages,

FYI: I applied for getting the access.



Hi @0sman - the 30-day premium product you mentioned is a search product. Regardless, I do not see that you have a developer account set up with your @0sman handle. Are you using another @handle to access the developer portal?

@mnrahman I do not see that you applied for access to the All Activities version of the Account Activity API. Can you please be sure you apply here -


Hi KyleW, Thanks for your reply. I applied from our company twitter account which @cention. I’m really sorry to mention the account.
So basically if the application approved then we will get Account activity for all activities, right?



It looks like your account is pending - once the account is approved, we can help provision access to the Account Activity API. You will likely hear from someone about your application soon.


We’re having the same issue with the API returning code 32, so we suspect that we don’t have access to the Account Activity API yet. But we’re also not able to apply:

When I click on it redirects me to the Dashboard ( and there it lists

  • Search Tweets: 30-Days / Sandbox
  • Search Tweets: Full Archive / Sandbox

Also can’t see any possibility besides those two at

Is it true that this account has no access to Account Acitivity API?
Where else can we apply for Account Acitivity API?


Hey @socialassiONE - It looks like the Account Activity API is not set up for your developer account. Which Client App would you like us to provide access for?


For the App: “SocialHub by maloon” (5399622)

Thanks a lot!


Hi @socialassiONE - we were able to provide access to the app you requested. Your environment name is: env-beta

Please be sure to check the documentation if you have any questions.


Hello @KyleW
Can you please help in How do i know, whether i have access to Standard or Direct Message API thread…



I too have the same issue,
App name : MsgBox r139
App owner : @MsgboxD
environment label: msgdev

I am not able to register the webhook.


What error are you seeing?


Thank you for the response
this is the error showing.

{“errors”:[{“code”:32,“message”:“Could not authenticate you.”}]}


Please make sure you have done the following:

  • You have an approved developer account.
  • You have set up a dev environment for the Account Activity API here.
  • You have set up your Twitter app’s Access token & access token secret access level is set to Read, Write, and Direct Messages. You can find this on the Keys and tokens tab of the app details/settings section. If it is not set to the proper access level, you must change the access level via the permissions tab of the app details/settings section and regenerate your access tokens.
  • Make sure you are using the proper app’s consumer keys and access tokens when registering your webhook URL. You can find which app you have attached to the Account Activity API by navigating to the “Dev Environments” page of the developer portal
  • Make sure you are using the proper :env_name in your request.

Please let me know if this helps you get past this error message. If it doesn’t, can you please provide the exact request that you are using to register your webhook URL?


I have cross-checked the above mentioned points, still shows error.

I am using the following php wrapper for the twitter api v1.1 twitter-api-php .

please see the code:

$consumerkey        = '****';
$consumersecret     = '*****';
$accesstoken        = '********-********';
$accesstokensecret  = '********';


$settings = array(
  'oauth_access_token' => $accesstoken,
  'oauth_access_token_secret' => $accesstokensecret,
  'consumer_key' => $consumerkey,
  'consumer_secret' => $consumersecret

$url = '';
$requestMethod = 'POST';
$twitter = new TwitterAPIExchange($settings);

echo $twitter->buildOauth($url, $requestMethod)


Unfortunately I’m not too familiar with PHP nor that repository.

Another thing that has helped people previously is changing the “?” to “&” in your signature base string.


Hi KyleW, Still didnt get the account approval. Is there any possibility for you to check?
It would be really grateful as we need it before 16th august as the site streams api gonna be deprecated.


Hey @mnrahman - It looks like we emailed asking for more information - please respond via email.