Omkar008 commited on
Commit
97d3e12
1 Parent(s): 28e4213

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -62,7 +62,7 @@ async def auth_google(request: Request):
62
  # print(access_token_new)
63
  user_info = requests.get("https://www.googleapis.com/oauth2/v1/userinfo", headers={"Authorization": f"Bearer {access_token_new}"})
64
  # user_query = data.get("user_query")
65
- query = "has:attachments receipts"
66
  gmail_url = f"https://www.googleapis.com/gmail/v1/users/me/messages?q={query}&maxResults=10"
67
  gmail_response = requests.get(gmail_url, headers={"Authorization": f"Bearer {access_token_new}"})
68
  messages = gmail_response.json().get("messages", [])
 
62
  # print(access_token_new)
63
  user_info = requests.get("https://www.googleapis.com/oauth2/v1/userinfo", headers={"Authorization": f"Bearer {access_token_new}"})
64
  # user_query = data.get("user_query")
65
+ query = "subject:receipts has:attachment"
66
  gmail_url = f"https://www.googleapis.com/gmail/v1/users/me/messages?q={query}&maxResults=10"
67
  gmail_response = requests.get(gmail_url, headers={"Authorization": f"Bearer {access_token_new}"})
68
  messages = gmail_response.json().get("messages", [])