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