This error occurs when the request you are trying to perform is not listed under the allowed actions of the SendGrid API key that you are using.
You can do one of the following.
Creating the new SendGrid API key with desired permissions
When creating the SendGrid API key, you can select the permissions that you need in the setup guide. To do so, visit the SendGrid API keys console and select "Create API Key." It displays the figure shown below.
Figure 01 - Creating a new SendGrid API key
As illustrated above, SendGrid allows you to select three permission scopes: Full Access, Restricted Access, and Billing Access. In addition, you can select the access levels that you require for your API Key based on your requirements.
Afterward, use the newly created API key to perform the allowed action, and your error will get resolved.
View all errors