Is User Allowed • AI Agent SDK
is_user_allowed: Check if a user is allowed to interact with the bot.
is_user_allowed
Method
</div>
This is a method of the BotConfig class in the config module.
Check if a user is allowed to interact with the bot.
Note: an empty `allowed_users returns True here for backward compatibility, but the inbound security pipeline gates on :meth:is_explicitly_allowed — an empty allowlist is NOT treated as "allow everyone" and instead defers to unknown_user_policy (default deny). Set unknown_user_policy="allow"` to open the bot to all users.
Signature
def is_user_allowed(user_id: str) -> boolParameters
ParamField
strNo description available.
Returns
ResponseField
boolThe result of the operation.
Source
View on GitHubpraisonaiagents/bots/config.py at line 218