'How can I send email from frontend website without having to expose API Key?
I got a server from OVH and downloaded a template from html5up. I then uploaded the template to the server : root schema
The thing is, I now want to send emails with a form that is on one of the html page.
The template has no backend, so I don't have any code where I can store API keys, or hide method that would call API to send email for me. I found a solution that made me write an ajax call from the JS directly to the API Rest, but the API Key would be visible.
How could I proceed ? Am I forced to write a backend ? Can I just add a java file, or a php file that would call an API ?
Thank you for your time !
Solution 1:[1]
I think you should use an open API, which does not require API keys.
Cuz, as soon as you use one with API keys, you have to find a way to hide/secure them, and the only approach is to setup your backend.
Massiles.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Massi Gy |
