Trying to make automation script to get credentials from vault

Im writing a script to login with bw login --apikey but after i do this command i need to give the client id first and the client secret but when i try in automation its not working.
does someone has a solution that can help me