Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP web call to Slack with user and bot token

Michail Kotantakis
Contributor
February 7, 2024

Hi team,

 

I am facing a strange situation when using a bot token for an HTTP call to a Slack app.

When using the user token to create a channel and then invite users to the channel, everything works perfect and as expected as i access the response from the create channel, put the channel id in a variable and then using this variable to a suibsequent call for the user invitation. Everything fine and as expected.

When i use the bot token to create the channel, nothing is logged in the log i have there for the variable for the channel id, hence the channel is created somwhere where i cannot see, and the subsequent call to invite users is not applied since there is not channel id in the variable

 

Anyone has a clue why the bot token does this while the user token works fine???

Worth to mention that both tokens have exactly the same permission scopes applied in the slack app.

Should i access the web response in a different way when i use the bot token??

This is how i have it setup and works for the user token:{{webResponse.body.channel.id}}

Additionally if i do the same calls using the bot token from postman, everything works fine. I cannot figure it out where is the issue

Thanks in advance

1 answer

0 votes
Michail Kotantakis
Contributor
February 7, 2024

image.pngimage.pngimage.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events