0

When the API is invoked, you can observe the this.accessToken and the request body in the browser's network tab.

const response = fetch(endpoint, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${this.accessToken}`,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({ contentVersionIds: contentVersionId }),
    timeout: 1200000, // 12 seconds timeout
})

To enhance security, is it possible to conceal or encrypt the payloads transmitted during API calls?

2
  • SSL is the recommended security layer that will protect you using HTTPS encrypting the data in transit. However you can manually encript the payload if you want to over engineer - const encryptedPayload = CryptoJS.AES.encrypt(JSON.stringify({ contentVersionIds: contentVersionId }), 'secretKey').toString(); Commented Mar 5, 2024 at 17:42
  • Thanks @RicardoGellman Salesforce is a secure platform and we have SSL too. This CryptoJS is a library of node js but I want to use it in js of the LWC component. Can you please provide me with an example of this? Commented Mar 7, 2024 at 6:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.