bots


Connecting existing Slack RTM bots to new Microsoft bot framework back end after upgrade


Sorry this is a bit long.
I have 2 versions of my bot:
Version 1.0 - based on Slack RTM back end. There are few hundred users who installed this.
Version 2.0 - based on Microsoft Bot Framework(BF) back end. a few dozen users installed this version since release a few days ago.
I have upgraded My Slack app to v2.0 to use the Bot Framework back end instead of RTM, received approval from Slack and now all new users are installing version 2.0 from the slack bot store. All good as expected.
But Once the new version of the slack app was published - I expected Slack to break the connection to the old RTM back end and connect the to the new BF back end. This did NOT happen and my few hundred users are still using the old RTM back end.
Contacted Slack support - they told me it cannot be done automatically and I need to initiate a connection for the already authenticated tokens from the BF service. How can I do that?
I tried to get the info from one of those teams and tried to send a message using the following code:
var connector = new ConnectorClient(new Uri("https://slack.botframework.com/"));
var conversation = new ConversationAccount(true, "B0JMAJ8C8:T0ANH2CG3:C0ANKNHU5");
var botAccount = new ChannelAccount("B0JMAJ8C8:T0ANH2CG3", "Grasp");
IMessageActivity message = Activity.CreateMessageActivity();
message.From = botAccount;
message.Conversation = conversation;
message.ChannelId = "slack";
message.Text = "Upgrade Test!";
message.Locale = "en-En";
connector.Conversations.SendToConversation((Activity)message);
But SendToConversation() gives me an exception:
Authorization for Microsoft App ID
122dd7ca-xxxxx-xxxx-b679-c696e212987a failed with status code
Forbidden
Is there any other way I can force a connection from BF without my users reinstalling the new version of the same bot?
Thanks in advance.
When users click the "Add To Slack" button an oauth flow is launched where the user grants the bot permission to their Slack team and receives a token that the bot uses to connect to Slack. There is currently no way to transfer that token from one bot to another so you'll need to get the users on your V1 bot rerun the "Add to Slack" oauth flow to switch to V2.

Related Links

how to save the data using state clinet in bots
Connecting LUIS dialog to form dialog and mapping builtin fields
ValidationResult throws : “Object reference not set to an instance of an object”. when passing back choices
How to disconnect LUIS of Microsoft Bot Connector selectively?
Skype bot in “In Review” Status
Bot framework documentation qna maker [closed]
How to make telegram bot to remove links?
Testing in Bot Framework returns 401 Unauthorized
Bot Framework .Net Activity reply = activity.CreateReply(
How to access the filled data when using Formflow Namespace in Skype Bot Framework?
Microsoft bot framework getting the users time zone
How to get credentials for the Direct Line API microsoft bot framework?
Telegram bots: How much API keys can I generate?
Weird rendering in “Fetch as Google”
Effective way of training the bot, language processing APIs
What would be the right way to ask the person to enter a city inside a bot?

Categories

HOME
office365
svn
automapper
typelite
magento-2.0
jint
hspi
mutation-testing
bellman-ford
swarm
grocery-crud
angular4
feature-extraction
fresco
pywinauto
vmware-workstation
fosuserbundle
rpmbuild
psql
gitkraken
sybase-ase
web-config-transform
introspection
msdeploy
sap-lumira
sparkle
ibm-connections
region
d3.js-v4
tightvnc
premake
mongodb-3.4
caesar-cipher
jfxtras
textmate2
redgate
xvfb
cargo
uivisualeffectview
text-decorations
cheat-engine
grunt-contrib-watch
web-inspector
asihttprequest
daz3d
common-table-expression
photoswipe
nusoap
android-sharing
exc-bad-access
google-news
pen
word-2007
portability
test-data
alertify
google-identity-toolkit
between
nsdata
android-4.2-jelly-bean
eclemma
meld
yii2-model
node-glob
processor
jemdoc
utf-16
trust
ioexception
asp.net-web-api-helppages
bjam
extend
canopy
vdm-sl
python-curses
html-escape-characters
fiware-bosun
debug-symbols
sunos
otl
csslint
incognito-mode
flipboard
nosql-aggregation
meteorite
grails-2.3
jquery-transit
django-facebook
apportable
.net-remoting
asp.net-mvc-3-areas
idispatch
nsmutablestring
gamesalad
mkannotation
navigationcontroller
play2-mini
nosetests
sql-parametrized-query
nsconnection
turbine
suphp
cleartype
source-code-protection
fxruby
subtext
version-control-migration
jboss-mdb
downloadfile
bindable-linq

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App