Where to store details

Where to store details

I am coding in C#, .Net Core v6. I have this code in an (my) API Application that will be used by another application (or possibly multiple other applications in the future):

  1. Token token = new OAuthToken.Builder()
  2. .ClientId("1234567890")
  3. .ClientSecret("2345678901")
  4. .RefreshToken("3456789012")
  5. .Build();

but I can't have those values hard-coded in the final version and, obviously, I need to secure the use of my Api Application. Would it be correct to put ClientSecret and RefreshToken into secure / secret storage and pass in the ClientId to my Api Application, from the calling program?