Secrets: Sample Use Cases and Flows

This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.

Get an API key and use it to fetch information from a weather service

This use case demonstrates how you can store an API key from a weather service (for example, https://openweathermap.org/), and then use it to fetch the weather information to display on your site.

To get the weather data:

  1. Call Create Secret to store your API key you received after signing up on the OpenWeather site.

  2. Call Get Secret Value, assign the returned value to a variable, and make an OpenWeather API call, for example:

    Copy
    1
  3. Extract the required values from the returned JSON object and display them on your site.

Was this helpful?
Yes
No