-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
senders argument for TransactionalEmailsApi.get_transac_blocked_contacts not optional #99
Comments
So I did some further testing - it appears that things work when making the call without the API. Let me demonstrate. Using the API try:
response = email_api.get_transac_blocked_contacts()
print(response)
except ApiException as e:
print(f"Exception when calling TransactionalEmailsApi->get_transac_blocked_contacts: {e}") results in
Using requests try:
url = "https://api.brevo.com/v3/smtp/blockedContacts?limit=50&offset=0&sort=desc"
headers = {
"accept": "application/json",
'api-key': settings.SENDINBLUE_API_KEY,
}
response = requests.get(url, headers=headers)
rj = response.json()
for contact in rj['contacts']:
contact['email'] = '****@****.tld'
if 'senderEmail' in contact:
contact['senderEmail'] = '****@****.tld'
print(json.dumps(rj, indent=4))
except ApiException as e:
print(f"Exception when calling TransactionalEmailsApi->get_transac_blocked_contacts: {e}") results in
So it appears that the method needs to handle the lack of the parameter a little differently. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for
TransactionalEmailsApi.get_transac_blocked_contacts
method indicates that thesenders
is optional.However this doesn't appear to be the case.
The text was updated successfully, but these errors were encountered: