#send message to slack without token

4 messages · Page 1 of 1 (latest)

abstract saffron
#

Anyone know how to send a message to slack without token anywhere in the code?

Slack token looks like this:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

I'm not allowed to have T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX anywhere in the code or in json file. I know similar function can be achieved in python via the use of BaseHook and getting password from slack conn id. Is there way to send a message to slack in Java as well?

hasty mesaBOT
#

This post has been reserved for your question.

Hey @abstract saffron! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

abstract saffron
#

resolved by sending token from airflow dag with xcom variable to scala class, then connect to HttpPost