I created a powershell script to automate the installation of a SendGrid Account in Azure. Everything works as expected. But after the installation is done, I would like to create an API Key to use it later in C#. This does not work. I tried to send this command with powershell:
curl -Uri "https://api.sendgrid.com/v3/api_keys" -Method Post -Body '{"name":"QnA APi Key","scopes":["mail.send"]}'
and I get the following error: {"errors":[{"field":null,"message":"authorization required"}]}
It seems that it needs the header 'authorization: Bearer <>'. But in my case, my goal is to create this key because no one was created before.
Does anybody know how to proceed when no API key was created at all?

