No, wait. Don't proces.env variables get inserted at runtime? Like, can't you just get the api keys by opening devtools, going to Application > Frames > Scripts, and searching for "require('node-mailjet').connect" ?
Yes they do, I was being more general and didn't want it to be a segue into a detailed explanation on process.env and serverless functions. Have realized the need for precision on what I was talking about and have done just that. Thanks for pointing that out 👍.
Thanks for the response. But then how do you do frontend api call without exposing your api secret key? Seems to me, the only way to do this would be via a server-side function of some sort?
No, wait. Don't proces.env variables get inserted at runtime? Like, can't you just get the api keys by opening devtools, going to Application > Frames > Scripts, and searching for "require('node-mailjet').connect" ?
Yes they do, I was being more general and didn't want it to be a segue into a detailed explanation on process.env and serverless functions. Have realized the need for precision on what I was talking about and have done just that. Thanks for pointing that out 👍.
Thanks for the response. But then how do you do frontend api call without exposing your api secret key? Seems to me, the only way to do this would be via a server-side function of some sort?
The secret keys are only accessed by the server-side function, the front end just makes API calls and has no access to the keys.