Spaces:
Running
Running
Update test.py
Browse files
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 {
|
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")
|