API access communications Mining

I’ll give it a try, but I also want to know how to connect from an application instead of a user account with a PAT. Users come and go, and the goal is to intergrate CM with an external application.