Yes, though the process varies somewhat by API. A given IBKR username may only be logged in with trading permissions to a single platform at a time.
For automated or hands-free use of an IBKR API, we typically recommend that clients create an additional username for their account solely for this purpose, so that an API client (e.g., software you've written) can be "logged in" with its own trading session, unaffected by manual logins by other usernames to IBKR platforms like IBKR Mobile or Trader Workstation.
Additional Information