As far as userId is part of the constructor – we need to provide the recommendations how to initialise client in DI per-request providing userId in the instance constructor.
Consider using Scoped dependencies with factory which will populate userId as part of the constructor along with appsettings.json for other dependencies. Probably we need to create a factory as part of the library which can be easily used.