Please check whether your target connector account has Microsoft Teams license. If not, assign Microsoft Teams license for the target connector account and try configuring Teams API again.
Note: Teams API Configuration Account should be same as the Target Connector Account.