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


#19

Sorry I meant the Twitter end URL


#20

https://api.twitter.com/1.1/account_activity/webhooks.json?url=https://demo.tetherfi.com:55443/Tetherfi_Messenger/api/Twitter


#21

https://api.twitter.com/1.1/account_activity/all/env-beta/webhooks.json

Try above URL


#22

Sagar,

Still same error. below is my registration param details


#23

@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.


#24

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.


#25

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

Cheers,
Sagar


#26

Hello LeBraat,

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


#27

Hey @sagar_0707,

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



#28

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

Regards,
Sagar


#29

Hello LeBraat,

Any updates on Account Activity API access.


#30

Hello twitter Team,

Any updates on my account Activity API access


#31

Team,
I can see Account Activity in dashboard.

And , here is my url to register webhook.

https://api.twitter.com/1.1/account_activity/all/env-beta/webhooks.json?oauth_consumer_key=xxxxxxxxxxxxxxxxxxxx&oauth_token=xxxxxxxxxxxxxxxx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1526979718&oauth_nonce=0v5HcT&oauth_version=1.0&oauth_signature=xxxx&url=https%3A%2F%2Fdemo.tetherfi.com%3A55443%2FTetherfi_Messenger_Twitter%2Fapi%2FTwitter
I’m getting below error :
The remote server returned an error: (400) Bad Request.

Anything is missing ?


#32

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


#33

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


#34

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


#35

Hello Andy.,

Can i get some help here to resolve Webhook registration issue


#36

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.


#37

@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?


#38

@andypiper

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."}]}