Currently, API editing isn't possible and if you try to do it, it throws an error: "You do not have permission to edit pages in the Widget namespace.".
Special:ListGrants lists all the bot API rights. But it lacks editwidgets API right because MediaWiki extension WIdgets does not declare any grants in its extension.json.
The API right therefore cannot be granted to a bot under Special:BotPasswords.
Reported privately by @adrelanos, he can provide more details if needed.