How to hide or encrypt the payloads when API calling is made from js of LWC?

27 views Asked by At

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?

0

There are 0 answers