John Landry commited on
Commit
ef1b7ba
1 Parent(s): 1f3c6b2
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -34,7 +34,7 @@ async def callback(request: Request):
34
  print("============ callback is being called ============")
35
  body = await request.body()
36
  print(body)
37
- data = json.loads(data)
38
  phone_num = data['entry'][0]['changes'][0]['value']['messages'][0]['from']
39
  mesg_body = data['entry'][0]['changes'][0]['value']['messages'][0]['text']['body']
40
  phone_number_id = data['entry'][0]['changes'][0]['value']['metadata']['phone_number_id']
 
34
  print("============ callback is being called ============")
35
  body = await request.body()
36
  print(body)
37
+ data = json.loads(body)
38
  phone_num = data['entry'][0]['changes'][0]['value']['messages'][0]['from']
39
  mesg_body = data['entry'][0]['changes'][0]['value']['messages'][0]['text']['body']
40
  phone_number_id = data['entry'][0]['changes'][0]['value']['metadata']['phone_number_id']