Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically change the APIKey #1210

Open
sharatchandra99 opened this issue Aug 5, 2024 · 0 comments
Open

Dynamically change the APIKey #1210

sharatchandra99 opened this issue Aug 5, 2024 · 0 comments

Comments

@sharatchandra99
Copy link

Hi Team,

I have added the following D.I. in my code,

services.AddSendGrid(options =>
{
options.ApiKey = Environment.GetEnvironmentVariable("SENDGRID_API_KEY");
})

Now I am getting SendGridClient in my service with the APIKey. But I want to change the API key before calling "SendEmailAsync". Can you please suggest any possible way for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant