How can I Create an API KEY in strapi

I want to connect Strapi to my React application but don’t want to expose my API response if anyone goes to my API link. I want to keep API response public so non authenticated users can also see the content on the front end of my application. And also I don’t want to expose API responses publically through API URLs.

I think you would need SSR (Server Side Rendering) for this if you don’t want the frontend to do it.
You can then have a function that you call without an API key, in your own “server” or “middleware” can be used.

What you want to do then is to get / post data to your own server URL etc, which then again will “relay” or “proxy” the data. You could then always pass to your OWN server or function the JWT so you know what user it is. Then from there you can get and send the data back.

1 Like