Integration in the application

Hello, I want to integrate in my application the automatic connection to a computer with TeamViewer, but the problem is with the password how can I get it or set it from the registers to the client in the code? or can i get a connection session? I want to automatically set the password not in the program