3rd Party API authentication using wix user/pwd

Just wondering the best technique to create a base64 authentication to send to a 3rd party api using wix’s user credentials. I would like to use the username and password that the user created in wix, so there is no need to enter another password to access the 3rd party api (user will have an account with the 3rd party api based on the same email). I have successfully hardcoded a username and password in the api headers using the following CryptoJS.enc.Utf8.parse and CryptoJS.enc.Base64.stringify (Authorization: Basic woijflsaj30u3rjfEKj3…).

Thanks for the help in advance.

Hi,
I was able to locate a similar post with the solution provided here .