How to use the messaging-api-slack.SlackOAuthClient.connect function in messaging-api-slack

To help you get started, we’ve selected a few messaging-api-slack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoctol / bottender / packages / bottender / src / slack / SlackConnector.ts View on Github external
constructor(options: ConstructorOptions) {
    const { verificationToken, skipLegacyProfile } = options;
    if ('client' in options) {
      this._client = options.client;
    } else {
      const { accessToken, origin } = options;
      this._client = SlackOAuthClient.connect({
        accessToken,
        origin,
      });
    }

    this._verificationToken = verificationToken || '';

    this._skipLegacyProfile =
      typeof skipLegacyProfile === 'boolean' ? skipLegacyProfile : true;

    if (!this._verificationToken) {
      warning(
        false,
        '`verificationToken` is not set. Will bypass Slack event verification.\nPass in `verificationToken` to perform Slack event verification.'
      );
    }

messaging-api-slack

Messaging API client for Slack

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis