Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBotUserId() returns NULL #52

Open
bohemianoid opened this issue Nov 12, 2019 · 1 comment
Open

getBotUserId() returns NULL #52

bohemianoid opened this issue Nov 12, 2019 · 1 comment

Comments

@bohemianoid
Copy link

bohemianoid commented Nov 12, 2019

When I call the getBotUserId() function, I do not get back the bot user ID but NULL.

Reproduction steps

<?php

use BotMan\BotMan\BotMan;
use BotMan\BotMan\BotManFactory;
use BotMan\BotMan\Drivers\DriverManager;

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../source/config.php';

DriverManager::loadDriver(\BotMan\Drivers\Slack\SlackDriver::class);

$botman = BotManFactory::create($config);

$botman->loadDriver('Slack');
$botUserId = $botman->getDriver()->getBotUserId();

echo $botUserId;
echo gettype($botUserId);

PHP: 7.1.33
Botman: 2.5.0
Slack-Driver: 2.2.0

@hani-borsen
Copy link

I think you need this permission:
https://api.slack.com/scopes/users:read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants