slack-api

Slack API missing_scope for bot requests

我们两清 提交于 2019-12-23 22:14:28
问题 I am trying to set channel topics with a bot user token, but I'm getting the missing_scope error: { ok: false, error: 'missing_scope', needed: 'channels:write', provided: 'identify,bot:basic' } It works if I provide the "OAuth Access Token" (instead of "Bot User OAuth Access Token") from https://api.slack.com/apps/:appId/oauth, but this is a poor solution because the message that gets printed in the channel says that the app installer set the channel topic, not the bot user. But, the docs say

Properly format a message for slack in bot framework

我的未来我决定 提交于 2019-12-23 19:23:19
问题 I'd like to send a message with buttons to the slack channel. I'm using the bot framework (c#). I want to use the "blocks" (attachments are deprecated according to the slack api docs). So I composed a sample message in the slack "Bot Kit Builder": The json for it looks like this: [ { "type": "section", "text": { "type": "mrkdwn", "text": "Which pill do you want to take?" } }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "Red", "emoji": true },

Can I use the Slack API to set the profile picture?

耗尽温柔 提交于 2019-12-23 12:12:35
问题 I am running a Slack team for a gaming community. My users all have avatars in the game and I am already using the Slack API to automatically set their Slack user name to their in-game name, so its easier for people to be recognized. In addition I would also like to automatically set their profile picture in Slack with their avatar picture from the game. However I could not figure out a way to do it, so my question is can it be done and if yes, how? My current starting point is the

How to Send Periodic Ephemeral (“Hidden”) Messages From a Slack Bot

耗尽温柔 提交于 2019-12-23 07:57:18
问题 I am interested in writing a Slack bot that will periodically send "ephemeral" messages to users. Ephemeral messages are messages that appear within a channel, but can only be seen by a particular user, like the responses to bot "slash commands" (e.g. "/who"). The goals here, however, are to have ephemeral messages sent periodically by the bot and: appear within the channel message stream (i.e. not in a DM/private message), and not in response to any slash command. How do I use the APIs to

How to use Slack's OAuth2 with a Java desktop application

眉间皱痕 提交于 2019-12-22 10:39:10
问题 Is there a way to authenticate a java desktop application with Slack using OAuth2? I am trying to follow Slack's guide. I am getting stuck because it says you get the access token inside of the redirect uri of your application. But since the app I am making does not exist inside of the web browser, is there anyway I can do this? Can my java application launch a localhost site that it can communicate with to use as the redirect uri? If so, how? 回答1: Desktop app as internal integration Before

Slack API - chat.update : “message_not_found”

别等时光非礼了梦想. 提交于 2019-12-22 06:37:39
问题 I'm using the 'slack-node' npm package to build a simple Slack App for my team. The initialization of the bot works great so far. I got it to post a message to a channel after using a custom slash command. This message contains an interactive button, which after the user pressed on it, the message should update. From my log: // User uses /event slash command 18:48:50 UTC - - Received [POST] to path [/event] // API response after posting the message { ok: true, message_ts: '1506538130.000343'

How to make a list of failed specs using jasmine custom reporter to post to slack?

烈酒焚心 提交于 2019-12-21 05:14:15
问题 I am trying to work on a custom jasmine reporter and get a list of all the failed specs in the specDone function: specDone: function(result) { if(result.status == 'failed') { failedExpectations.push(result.fullName); console.log(failedExpectations); } } where failedExpectations will store an entire list of the failed specs and i need to access this in the afterLaunch function in the protractor config file. But due to the fact that the config file loads everytime a new spec runs it basically

How to install bot in multiple teams without adding it to the directory?

大城市里の小女人 提交于 2019-12-20 19:38:31
问题 I just finished creating my first slack bot in my dev slack team using the Microsoft bot framework. Now I would like to add the bot to another team for testing. My bot is not going to be for public use, just internal to the company. I tried use the Add to Slack button to add it to the new team but I get an : OAuth Error: invalid_team_for_non_distributed_app. Thanks. 回答1: You need to go to settings of your app (https://api.slack.com/apps/ → Your app name → Manage distribution) and activate

Can Hubot Slack bot store sessions

你。 提交于 2019-12-19 10:49:25
问题 I am trying to implement simple slack bot. So I have configured hubot which will take inputs from slack and passing it to my webapp ( django app ) and it will take whatever the response from django-app and will reply to slack. In this process I am trying to store session in django using request.session but that is not reflected in slack . If I am accessing the django-url in browser it is able to store sessions and getting proper response with session. So does the problem lie with slack or my

Is a Slack channel id unique across teams?

假装没事ソ 提交于 2019-12-18 19:02:14
问题 Is a Slack channel/group/im/mpim id unique across different teams? In other words, can two teams have channels with the same id? I read the docs, searched on Google and here on SO, but could not get confirmation if channel IDs are unique or not. 回答1: Slack plans to clarify this in documentation soon. While in the present day you'd probably get by just fine assuming IDs are unique across different teams, we strongly recommend scoping all of your storage and retrieval by team ID. Essentially,