Feature: Twitter DM Integration (#451)
An initial version of twitter integration Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
8
config/initializers/twitter.rb
Normal file
8
config/initializers/twitter.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
$twitter = Twitty::Facade.new do |config|
|
||||
config.consumer_key = ENV.fetch('TWITTER_CONSUMER_KEY', nil)
|
||||
config.consumer_secret = ENV.fetch('TWITTER_CONSUMER_SECRET', nil)
|
||||
config.access_token = ENV.fetch('TWITTER_ACCESS_TOKEN', nil)
|
||||
config.access_token_secret = ENV.fetch('TWITTER_ACCESS_TOKEN_SECRET', nil)
|
||||
config.base_url = 'https://api.twitter.com'
|
||||
config.environment = 'chatwootstaging'
|
||||
end
|
||||
@@ -110,6 +110,9 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
mount Facebook::Messenger::Server, at: 'bot'
|
||||
get 'webhooks/twitter', to: 'api/v1/webhooks#twitter_crc'
|
||||
post 'webhooks/twitter', to: 'api/v1/webhooks#twitter_events'
|
||||
|
||||
post '/webhooks/telegram/:account_id/:inbox_id' => 'home#telegram'
|
||||
|
||||
# Routes for testing
|
||||
|
||||
Reference in New Issue
Block a user