Omkar008 commited on
Commit
238f6ea
1 Parent(s): b427156

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -88,7 +88,7 @@ async def auth_google(request: Request):
88
  if "body" in part and "attachmentId" in part["body"]:
89
  attachment_id = part["body"]["attachmentId"]
90
  attachment_url = f"https://www.googleapis.com/gmail/v1/users/me/messages/{message_id}/attachments/{attachment_id}"
91
- attachment_response = requests.get(attachment_url, headers={"Authorization": f"Bearer {access_token}"})
92
  attachment_data = attachment_response.json()
93
  data = attachment_data.get("data")
94
  filename = part.get("filename", "untitled.txt")
 
88
  if "body" in part and "attachmentId" in part["body"]:
89
  attachment_id = part["body"]["attachmentId"]
90
  attachment_url = f"https://www.googleapis.com/gmail/v1/users/me/messages/{message_id}/attachments/{attachment_id}"
91
+ attachment_response = requests.get(attachment_url, headers={"Authorization": f"Bearer {access_token_new}"})
92
  attachment_data = attachment_response.json()
93
  data = attachment_data.get("data")
94
  filename = part.get("filename", "untitled.txt")