sendgrid

SendGrid: 'source' is not recognized as an internal or external command, operable program or batch file


I am trying to set up the web api for SendGrid.

I can't create the environment variable. In CMD or Anaconda Prompt, when I enter source ./sendgrid.env

I get:

'source' is not recognized as an internal or external command, operable program or batch file.

++++++++ Instructions from SendGrid +++++++++++++++++++

Create an environment variable
Update your development environment with your SENDGRID_API_KEY. Run the following in your shell:

echo "export SENDGRID_API_KEY='XXXXX'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env

Solution

  • source is a *nix command and it appears you are using Windows.

    Windows also doesn't support export to set environment variables. To set an environment variable you can either use the UI, as described in this blog post. Or you can use the set function, e.g.

    set SENDGRID_API_KEY SG.xxx
    

    Then you should be able to run your application.