Bolt-js: Please explain where to obtain the botId

Created on 19 May 2019  路  3Comments  路  Source: slackapi/bolt-js

Description

The Authentication documentation talks about the authorize function needing to return both a botUserId and a botId. The first is easily obtained from the OAuth flow, but the second is a bit of a mystery. The concept of a _Bot ID_ cannot be found of slack.dev - google search for both botId and bot_id return nothing useful.

Can this please be clarified in the documentation?

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [ ] enhancement (feature request)
  • [ ] question
  • [x] documentation related
  • [ ] testing related
  • [ ] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Most helpful comment

Can you share your answer?

All 3 comments

I'm closing this because I think I figured this out.

Can you share your answer?

During oauth flow, we can get botUserId and botAccessToken via the method oauth.access.

Use the token to request users.info of that bot, i.e, pass the botUserId as the user argument. You can find botId at the property of the response at user.profile.bot_id.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Falci picture Falci  路  5Comments

johnsonyick picture johnsonyick  路  4Comments

jacklein picture jacklein  路  4Comments

selfcontained picture selfcontained  路  4Comments

johnsonsamuel picture johnsonsamuel  路  4Comments