Oauth 2.0 outlook problem

Hi,

i need help i want sent email outlook with oauth 2

i have
client ID --> userid
secret --> token
email with pw

how i can do it?
i getting this error : ReferenceError: msg is not defined

THX