Last active
March 19, 2023 05:21
-
-
Save toshvelaga/06b01cba7d712717fc758a97730525f4 to your computer and use it in GitHub Desktop.
API that checks if user is an individual or a business. If user is a business sends an email notification. python implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
url = "https://7a6to3aeyb.execute-api.us-west-1.amazonaws.com/default/notify" | |
payload = json.dumps({ | |
"email_of_user": "USERS_THAT_REGISTERED_EMAIL_ADDRESS", | |
"email_of_recepient": "YOUR_EMAIL_ADDRESS_HERE" | |
}) | |
headers = { | |
"Content-Type": "application/json" | |
} | |
response = requests.post(url, headers=headers, data=payload) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment