So we've created a unique API key for each of our users. Now it's time to show it on the front end. We will expose a backend function that the client can call as if it was a regular async function without the hassle of issuing a network request. We call these functions Web Modules.
- Drag a text field to the stage.
- Create a new
.jsw
file and expose the API key of the user - Call it from the front end and change the text of the text field.
If so your site should look similar to
Let's continue to Step 6 - Monitoring a service and exposing REST API
Take a look at:
- members dashboard page code
api-key.jsw
file