You should NOT be encouraging users to store credentials into environments.
This implementation was horrid in your api and it's insane that it still exists in this form.
Allow users to pass in json-like structures or envs as these are the industry standard best practices