Open mmartoccia opened 9 years ago
sure thing! there are a few environment variables you're gonna want to set to verify all payloads.
if you are using slash commands, then you need an environment variable for each robot set to the token found in that slash command's slack integration page. The environment variable is {SLASH_COMMAND}_SLACK_TOKEN
.
e.g.
/ping
-> PING_SLACK_TOKEN
/bot
-> BOT_SLACK_TOKEN
For Outgoing Webhook (trigger word) commands, you just need one environment variable set to {DOMAIN}_OUT_TOKEN
e.g.
Your organization's domain is:
domain.slack.com
-> DOMAIN_OUT_TOKEN
gophers.slack.com
-> GOPHERS_OUT_TOKEN
You can find this token in your Outgoing Webhook integration page.
I am also considering adding an --insecure
flag to turn off verification.
Thank you @trinchan that got through that hurdle - the next hurdle is getting the robots registered. Do you have a step-by-step on how to use your version of heroku-buildpack-go? I'm using Heroku and the Github connect function to deploy my fork. I'm clearly missing go generate ./... and go install ./.... how do I go about adding these in? (all this is good wiki material btw +1)
go generate
should only be necessary if you are not using a fork. if you are forked the project, you can run go generate ./...
locally, then commit the generated init.go
to your fork.
if you want to use my buildpack with go generate support, you can check the Buildpacks heroku support page. The repo for my buildpack is https://github.com/trinchan/heroku-buildpack-go.
First off, thank you for putting together this framework! I'm having trouble getting past [DEBUG] Ignoring request from unidentified source: - ". I suspect that my environment variables are not setup correctly. In main.go line 35 is looking for %s_OUT_TOKEN. What is %s in this regard? I think my environment variables are not coming across or being referenced right.