Synthetic monitoring script handle multi-factor authentication

Can we write script that handle the use of a one time PIN via a soft token?
Thanks,