Yammer message posting with #mention in the body enables that person to involve in a conversation even he is not in that private group. But when doing this through REST API, that person is able to see the message only if he is already in the private group. Anyone has overcome this?
Related
I have added a slack conversation dropdown and in the response I want to save/show channel name (or conversation name). I'm able to get the public channels information through conversation.info API but for the private channels, I am not able to fetch any details. Can someone help me how I can get the names along with channel id (or conversation id).
This is the response from the slack on selecting a channel
{'values': {'channel_block': {'selected_action_id': {'type': 'conversations_select', 'selected_conversation': 'G0*****JM'}}}}
The token you're using to call conversations.info must have access to the channel in question before you can access it. I'm assuming it doesn't, but without seeing the response from the API I can't be sure.
I have a Slack bot that uses a slash command, but I first need information from the conversation.
Required Scopes for conversations.info (mine only needs im:read and mpim:read):
channels:read groups:read im:read mpim:read
payload = request.form
headers = request.headers
trigger_id = payload['trigger_id']
channel_id = payload['channel_id']
user_id = payload['user_id']
timestamp = headers['X-Slack-Request-Timestamp']
conversation_info = slack_client.conversations_info(
token=SLACK_BOT_TOKEN,
channel=channel_id
)
This code is returning the "channel_not_found" error when I invoke the Slack Bot from within my personal DM's, am I missing something? I have both im:read and mpim:read scopes added. I even tried the tester from Slack's API page and it doesn't work either.
I have been ashed this on Slack Support, and they said, you can not see information about private channels and direct messages, which the bot is not member of. They said, privacy is over everything.
You can invite a bot into private groups with /invite #BotName, but you can't invite to direct messages.
You can only see information about direct conversation, if you are using a UserToken, and the token's owner is part of that DM.
I have tried to send MS Teams bot message request via rest api:
End point: https://smba.trafficmanager.net/ca/apis/v3/conversations/{conversation id}/activities
{"text":"test","type":"message"}
And got empty response:
{}
The message i sent did not appear in the conversation.
Any idea where i could have misconfigured?
It is possible that trustServiceUrl needs to be run before a message is sent, i can't find equivalent rest api to call.
You definitely do need call trustServiceUrl before sending the message. In addition, you need to have additional properties on your activity, like the destination user or tenant id. Please refer to the documents on this, and good starting places are here and here.
I have a bot with event scopes app_mention and messages.im. It also has OAuth scopes app_mentions.read, channels.history, chat.write, groups.history, and im.history.
If I # mention my bot in a public channel, a thread off of a public channel, or directly message my bot I get an event. But if I'm in a private message with someone else and # mention my bot, I don't get any events from the #mention.
What is the correct event scope to enable to get the event?
you can't unfortuantly. app_mention only works in conversations the bot would have access to. You would need each user to directly give you access to im history and monitor every message event for a mention of the bot itself (probably either some regex or similar to look for the <#bot_name>.
I know there was a link_names part of the json object being sent for message events but you'd still need to check the message body to make sure its your bot being mentioned and not another user
We are posting a message to Yammer from our app about a specific user> Is it possible for the user to receive a notification about this message and if so how do we enforce this?
I've tried including "#username" in the message body but to no avail...
When a user is #mentioned ("at mentioned") in a conversation that thread should appear in the user's inbox. It won't appear in the notifications because that is reserved for specific notifications.
When you #mention the user today is the #username part being correctly linked to their profile? If not you might want to check out my other post on this subject. Once the permalink is used you should see it replaced with the user's profile name, and this is what triggers the connection. It should then appear in the inbox of the #mentioned user, even if they don't follow the conversation in their inbox.