Unable to authorize using OAuth
I tried to run this script to receive messages using examples/greet-and-react but getting the following error:
Error: Failed to serialize user into session
application.js:630
at pass (e:\Convee\Telegram\node_modules\passport\lib\authenticator.js:281:19)
at Authenticator.serializeUser (e:\Convee\Telegram\node_modules\passport\lib\authenticator.js:299:5)
at SessionManager.logIn (e:\Convee\Telegram\node_modules\passport\lib\sessionmanager.js:14:8)
at IncomingMessage.req.login.req.logIn (e:\Convee\Telegram\node_modules\passport\lib\http\request.js:50:33)
at SlackStrategy.strategy.success (e:\Convee\Telegram\node_modules\passport\lib\middleware\authenticate.js:248:13)
at verified (e:\Convee\Telegram\node_modules\passport-oauth2\lib\strategy.js:177:20)
at Object.passport.use.SlackStrategy [as verify] (e:\Convee\Telegram\app.js:44:3)
at SlackStrategy._verify (e:\Convee\Telegram\node_modules\@aoberoi\passport-slack\dist\strategy.js:78:24)
at e:\Convee\Telegram\node_modules\passport-oauth2\lib\strategy.js:184:24
at skipIt (e:\Convee\Telegram\node_modules\passport-oauth2\lib\strategy.js:348:12)
Slack API's are so complex to work with. I just want to receive the messages which is sent from my app/bot on any channel but unable to find any solution. And in this library also, you need to maintain many keys,secrets, token and then authentication etc. why not to make it simple as telegarm, facebook,kik,skype bots? A big Downvote Slack!!!!
this error would occur if you've enabled using a session, but did not provide the serializeUser and deserializeUser callbacks. the example as written uses the options { session: false }, so it seems like you must have changed that. if that's not the case, please describe any other changes you've made so we can help you debug this.
thanks for your feedback about the complexity. the Slack APIs can range from very very simple (like incoming webhooks) to substantially complex. we know that developers have varied needs from the platform and try to make APIs that fit the complexity on all points along that range. if we're not hitting that mark, we're always listening in order to make improvements.
specifically, you say you just want to receive messages that your own app/bot sent. i'm confused by this. if you're own app/bot sent those messages, then you already know about them, right? if you need metadata like the ts of those messages after they are sent, then the response from the Web API chat.postMessage should contain that information. you might not need to use the Events API. if your needs are different, let me know and i can try to guide you towards a solution that fits your needs better.