I am writing a python program that can login to my CyberArk using my username, password and Radious OTP and generate a temporary auth token, that i can use in other function. Can anyone please tell me if there is way to integrate my Radious OTP that I am getting from the Authenticator app on my phone to the below code, or if there is any other way of doing it.
Following link is difficult to understand: https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/10.10/en/Content/SDK/CyberArkAuthentication-Logon.htm
import requests
url = "https://<MyServer>//PasswordVault/API/Auth/radius/Logon"
payload = "{\n\t\"username\": \"abcd\",\n\t\"Password\": \"efgh\",\n\t\"useRadiusAuthentication\":\"yes\"\n}"
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))