Skip to content

Commit 8a53dc9

Browse files
author
Sam Harrison
committed
docs: correct the API key param name
1 parent a81abdd commit 8a53dc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import sendgrid
9393
import os
9494
from sendgrid.helpers.mail import *
9595

96-
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
96+
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
9797
from_email = Email("test@example.com")
9898
to_email = Email("test@example.com")
9999
subject = "Sending with SendGrid is Fun"
@@ -115,7 +115,7 @@ The following is the minimum needed code to send an email without the /mail/send
115115
import sendgrid
116116
import os
117117

118-
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
118+
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
119119
data = {
120120
"personalizations": [
121121
{
@@ -149,7 +149,7 @@ print(response.headers)
149149
import sendgrid
150150
import os
151151

152-
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
152+
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
153153
response = sg.client.suppression.bounces.get()
154154
print(response.status_code)
155155
print(response.body)
@@ -162,7 +162,7 @@ print(response.headers)
162162
import sendgrid
163163
import os
164164

165-
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
165+
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
166166
response = sg.client._("suppression/bounces").get()
167167
print(response.status_code)
168168
print(response.body)

0 commit comments

Comments
 (0)