function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VenkatVenkat 

encrypt password in debug logs when using rest API

Hi All,

I am using rest API to connect other tool in salesforce. I am passing username and password for connection. This password is displaying as it is in debug logs. How can I encrypt this password in apex.

Please help.

Thanks
Venkat

 
pconpcon
There is no way that I know that you can encrypt this in the debug logs.  You can change your log levels from the DEBUG level to something higher and they will not be displayed.  If your endpoint support it, you could always Base64 encrypt your password and use that to authenticate with your endpoint.