devZenaight commited on
Commit
a4affd8
·
verified ·
1 Parent(s): b73503b

Upload 5 files

Browse files
Files changed (1) hide show
  1. main.py +4 -1
main.py CHANGED
@@ -39,7 +39,10 @@ async def receive_update(req: Request):
39
  media_url_resp.raise_for_status()
40
  media_url = media_url_resp.json().get("url")
41
  # download the media bytes
42
- media_bytes_resp = httpx.get(media_url)
 
 
 
43
  media_bytes_resp.raise_for_status()
44
  data = media_bytes_resp.content
45
  # convert to base64 and take first 10 chars
 
39
  media_url_resp.raise_for_status()
40
  media_url = media_url_resp.json().get("url")
41
  # download the media bytes
42
+ media_bytes_resp = httpx.get(
43
+ media_url,
44
+ headers={"Authorization": f"Bearer {WHATSAPP_API_TOKEN}"}
45
+ )
46
  media_bytes_resp.raise_for_status()
47
  data = media_bytes_resp.content
48
  # convert to base64 and take first 10 chars