I have setup a Slack connection using Resources.
How do i retrieve the token to be passed to a variable in a listener?
Asking chatgpt did not work as i think this is very specific question.
Was following this, noticed that it uses
import
com.onresolve.scriptrunner.slack.SlackUtil
but not sure the library have function to get the slack token.
Any pointers would be greatly appreaciated!
Welcome to the Atlassian Community!
Asking ChatGPT is almost always going to give you the wrong answer - it tends to tell you what you want to hear rather than the truth.
The library you've found will work, but you do need to test it with your code.
thanks @Nic Brough -Adaptavist- , i tested all the functions for the SlackUtil, but not sure there is a function to retrieve the token, as I read somewhere that would be flawed design. (chatgpt gave me that answer too)
for example, the function message already embeds the token inside, and we only need to reference which token to use by the name, as shown here
appreciate the response Nic!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.