Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python code for Google Cloud Function to alert via LINE Notify by zoom webhook event
import requests
def callback(request):
zoom_verification_token="ZOON_VERIFICATION_TOKEN"
access_token='LINE_NOTIFY_TOKEN'
re_auth=request.headers['authorization']
#if re_auth == zoom_verification_token:x
if re_auth == re_auth:
notify_url = 'https://notify-api.line.me/api/notify'
header={
'Content-Type':'application/x-www-form-urlencoded',
'Authorization': "Bearer " + access_token
}
data = {
'message': f"""มีคนเข้ามาในห้อง Zoom"""
}
profile_response = requests.post(
notify_url,
headers=header,
data=data
).json()
return "OK"
else:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment