...
Open your Visual Studio > right-click in your project > select the option “Manage User Secrets”
Note: I created this documentation with Visual Studio 2022Note: the secrets are storage on C:\Users\<windowsuser>\AppData\Roaming\Microsoft\UserSecrets. To create a secret by command line, you can use
Code Block dotnet user-secrets set "Movies:ServiceApiKey" "12345"
Add this structure and run your project
Note: If you have this error when you run the project, maybe the structure of the keys is not correct.
...