botman / driver-hangouts

BotMan Hangouts Chat Driver
MIT License
10 stars 5 forks source link

Google side settings? #4

Open jamenlang opened 5 years ago

jamenlang commented 5 years ago

I see an option for Bot URL* that requires an https endpoint... is that what I should be using? how do I get bot studio/ laravel to serve as https?

*edit, fixed with apache running a proxy to php artisan.

With a little help from this french script https://github.com/CedricGoby/linux-server-install/blob/master/node-red-apache-ssl.sh

jamenlang commented 5 years ago

I figured out my problem. I don't have a solution.

botman was not reading the configuration file for hangouts, I troubleshooted the vendor/botman/driver-hangouts/src/HangoutsDriver.php and found that the incoming message had the correct token, but $this->config->token was 'null'

I hardcoded my string and it worked! 🥇

jamenlang commented 5 years ago

I found the ACTUAL problem, config/botman/hangouts.php has ENV() which references entries in the .env file where the hangouts token was not defined. So don't make changes to the HangoutsDriver.php file directly (if you do that's fine, but it needs to be 'token' => 'YOUR-WEBHOOK-TOKEN', not 'token' => ENV('YOUR-WEBHOOK-TOKEN')), instead put the token in the .env file with HANGOUTS_TOKEN=YOUR-WEBHOOK-TOKEN