The most probable reason for the Error=BadAuthentication
response is from a bad username or password.
This response may also be returned if the POST
data is incorrectly formatted. The form variable name and values in the POST
body must be individually encoded using the standard percent-encoding used in standard form POST
s. The most common characters that need encoding are the @ symbol in e-mail addresses and the & character sometimes found in passwords.