metadataHeaders option failing with multiple headers
Here is my code snippet: if messages['messages']: for message in messages['messages']: batch.add(gmail_client.users().messages().get(userId='me', id=message['id'], format='metadata', fields="payload,threadId,id", metadataHeaders="from,to,date,subject"), callback=messageCallback) batch.execute() This works fine with just one option in metadataHeaders, but with multiple headers listed it's not returning any headers at all. Any ideas? Just figured it out. The documentation is incorrect, the correct format for this parameter is an array of strings rather than a single string. You can see the error