0
API KEY
If we use API key directly in our js script, then anyone can access or misuse the api key. Is there any way to avoid such situations?
2 ответов
+ 1
The easiest way is to use the online JavaScript Obfurcator Tool to encrypt your file. That way your key will be impossible or at least way harder to get.
+ 1
Well you could use back-end server, either your own or other popular services.
I think you could also use a worker, like Cloudflare worker so it acts as a secure layer between your website/webpage and the API key. They have a free plan(which allows 100,000 requests per month).