I've make the webhook endpoint for zoom. I can receive the meeting webhook but I can't receive the recording webhook
@router.post('/webhook')
async def webhook(request: Request):
headers = dict(request.headers)
body = await request.json()
print(headers)
print(body)
if 'payload' in body and 'plainToken' in body['payload']:
secret_token = ZOOM_SECRET_TOKEN.encode("utf-8")
plaintoken = body['payload']['plainToken']
mess = plaintoken.encode("utf-8")
has = hmac.new(secret_token, mess, hashlib.sha256).digest()
hexmessage = has.hex()
response = {
'message': {
'plainToken': plaintoken,
'encryptedToken': hexmessage
}
}
print(response['message'])
return response['message']
else:
return {'error': 'Invalid payload'}
There something wrong with my code or something else?