Webhook Registration Failed, throwing an erro "code": 32, "message": "Could not authenticate you."



Try above URL



Still same error. below is my registration param details


@Chirag24624560 - Please do not share your API tokens publically. I have deleted your images from the last post to protect your privacy.

Please be patient and wait until you receive an approval email. It is worthless to try to access the API until you have received an approval email. There is no way to speed up the approval process, so I suggest you sit tight until we get around to your application.


Hey @sagar_0707,

First off, we suggest that you stick to the All Activities endpoint.

There are various suggestions for causes of that error message in this thread.


Hi LeBraat,

I managed to register the webhook URL and got the webhook id as well. The problem was on my side as TwitterAPI module do the parameter encoding and I was passing them the encoded data

pasted the webhook URL as it is and it worked
r = twitterAPI.request(‘account_activity/all/:%s/webhooks’% ENVNAME , {‘url’:‘https://vatwitter.herokuapp.com/webhook’})

Now I am getting error code 34 “Sorry, that page does not exist.” for subscriptions end URL
Request URL: account_activity/all/env-beta/subscriptions



Hello LeBraat,

Will not share any data. Will wait for to get approval


Hey @sagar_0707,

I strongly recommend that you try to use one of the following:


Hi LeBraat,

I have tried RickRedSix/twitter-webhook-boilerplate-python but no luck.

With the error below:
Status code: 404
Response text: {“errors”:[{“code”:34,“message”:“Sorry, that page does not exist.”}]}
For subscription URL: account_activity/all/env-beta/subscriptions



Hello LeBraat,

Any updates on Account Activity API access.


Hello twitter Team,

Any updates on my account Activity API access


I can see Account Activity in dashboard.

And , here is my url to register webhook.

I’m getting below error :
The remote server returned an error: (400) Bad Request.

Anything is missing ?


Looks like its not reaching to Webhook url. do i need to do any application settings ?


Are you seeing any inbound traffic from Twitter to check your webhook after you post the request to register it?


Hello Andy,

No. I’m not seeing any inbound traffic from twitter, Today i have made silght changes in the code and now i’m getting 401 error
The remote server returned an error: (401) Unauthorized.
I’m able to get direct messages through pooling, but webhook registration still having problem.

Need your help


Hello Andy.,

Can i get some help here to resolve Webhook registration issue


Currently i have a sandbox developer account and my app name is ‘Zammad Zaihan’

I had used https://github.com/twitterdev/SnowBotDev

getting all_webhook_configs() has no error

[4] pry(main)> wh.all_webhook_configs()
Retrieving webhook configurations...
twitter API: #<OAuth::AccessToken:0x00007fc4b59629c8 @token="xxxx", @secret="xxxxx", @consumer=#<OAuth::Consumer:0x00007fc4b5962d38 @key="xxxx", @secret="xxxx", @options={:signature_method=>"HMAC-SHA1", :request_token_path=>"/oauth/request_token", :authorize_path=>"/oauth/authorize", :access_token_path=>"/oauth/access_token", :proxy=>nil, :scheme=>:header, :http_method=>:post, :debug_output=>nil, :oauth_version=>"1.0", :site=>"https://api.twitter.com"}>, @params={:oauth_token=>"xxx", :oauth_token_secret=>"xxx"}>
No existing twitter webhook configurations...
=> []

But if i were to add a new webhook i came with this error:

[3] pry(main)> wh.add_webhook_config('https://mn.taqisystems.com/webhook')
Setting a webhook configuration...
POST ERROR occurred with /1.1/account_activity/all/devel/webhooks.json?url=https://mn.taqisystems.com/webhook, request:
Error code: 401 #<Net::HTTPUnauthorized:0x00007ff56ee65ad0>
Error Message: {"errors":[{"code":32,"message":"Could not authenticate you."}]}
[{"code"=>32, "message"=>"Could not authenticate you."}]
=> {"errors"=>[{"code"=>32, "message"=>"Could not authenticate you."}]}

It is urgent for us to get this working since we need to implement it (before august) for our opensource Zammad system which allows our users to get support through twitter.


@Chirag24624560 @LeBraat @sagar_0707

can you solved the problem of “Webhook Registration Failed”.

i also meet the same issue of “Webhook Registration Failed”, can you tell me how to deal with this issue?



Andy, i have tried my best to debug the issue and it seems the nature of the problem is not with the code but with twitter not authorizing me to add my webhook. All you did was to remove me tagging you in and ignore me for weeks.

How am i supposed to meet the august deadline for activity API and you guys closing down the streaming API and not even helping?

The example below is directly using https://github.com/twitterdev/SnowBotDev

╰─ racksh
Rack::Shell v1.0.0 started in development environment.
>> load './scripts/setup_webhooks.rb'
=> true
>> wh = TaskManager.new
=> #<TaskManager:0x00007fb33feaf4d0 @uri_path="/1.1/account_activity", @twitter_api=#<ApiOauthRequest:0x00007fb33feaf458 @base_url="https://api.twitter.com", @keys={"consumer_key"=>"xxx", "consumer_secret"=>"xxx", "access_token"=>"xxx", "access_token_secret"=>"xxx"}, @twitter_api=#<OAuth::AccessToken:0x00007fb33feaf188 @token="xxx", @secret="xxx", @consumer=#<OAuth::Consumer:0x00007fb33feaf2f0 @key="xxx", @secret="xxxJ", @options={:signature_method=>"HMAC-SHA1", :request_token_path=>"/oauth/request_token", :authorize_path=>"/oauth/authorize", :access_token_path=>"/oauth/access_token", :proxy=>nil, :scheme=>:header, :http_method=>:post, :debug_output=>nil, :oauth_version=>"1.0", :site=>"https://api.twitter.com"}>, @params={:oauth_token=>"adad", :oauth_token_secret=>"adads"}>>, @api_tier="premium", @env_name="devel", @webhook_configs=[]>
>> wh.set_webhook_config('https://mn.taqisystems.com/webhook')
Setting a webhook configuration...
POST ERROR occurred with /1.1/account_activity/all/devel/webhooks.json?url=https://mn.taqisystems.com/webhook, request:
Error code: 401 #<Net::HTTPUnauthorized:0x00007fb33fe8d128>
Error Message: {"errors":[{"code":32,"message":"Could not authenticate you."}]}
{"code"=>32, "message"=>"Could not authenticate you."}
=> {"errors"=>[{"code"=>32, "message"=>"Could not authenticate you."}]} 


Please don’t tag individual staff members into posts as we are not always all available to answer every question. I’m sorry if you feel that you were being ignored - that was not intentional.

In your copy of the SnowBot code above, where are you setting the consumer key and secret? What about the premium tier value? I can see obfuscated values being returned in the TaskManager constructor trace, but I’m just trying to reproduce your example as best I can locally.

Are you encoding the URL value? Note that if you call this script from the command line rather than in racksh, the URL value is run through url = CGI::escape($url) before being passed to the set function.


FWIW I just ran the same thing in racksh having encoded your URL - obviously with my own valid tokens and env name - and now see:

Error Message: {"errors":[{"code":214,"message":"High latency on CRC GET request. Your webhook should respond in less than 3 seconds."}]}

Having the URL raw without URL encoding it, caused the error 32 for me also.