its been a while that i'd been yearning to create my own open-source community connector but almost every usable data source api that i'd stumbled upon required some kind of auth while the tutorials & explanations available in almost every other blog post typically ended up using "none" 😐
felt like all the more reason for me to share this one.
authenticate to the sendgrid api by creating an api key in the settings section of the sendgrid ui.
SendGrid recommends API Keys because they are a secure way to talk to the SendGrid API that is separate from your username and password. If your API key gets compromised in any way, it is easy to delete and create a new one and update your environment variables with the new key. An API key permissions can be set to provide access to different functions of your account, without providing full access to your account as a whole.
you will be prompted to enter this key while setting up the connector for the first time.
you can access the entire script on my github repository here.
perhaps except for 2, all the functions that have been invoked in this endeavour are mandatory -
the auth collective
this app isn't verified
when authorizing the community connector, if you are presented with an "unverified" warning screen see this app isn't verified for details on how to proceed.
start date is too far in the past
sendgrid's stats APIs provide a read-only access to your email statistics that are available only for the last 3 years and so if you stumble upon the following error, please change the date range from the data studio viz.
"message": "start date is too far in the past",