You can fix the 400 Bad Request
by going to your domain's Admin Console, Manage API client access page under security and add the Client ID
from the Developer Console, add the scopes needed for the Gmail API. Check the Delegation domain-wide authority to the service account.
They work well for APIs that dont need a user or when you are using a Google Apps for Work domain and want delegation enabled for all the users in the domain.
As the document stated that If a request result in a new source is syntactically or semantically invalid, the server returns a 400 Bad Request HTTP status code and the source state remains unchanged.
Here's a related SO ticket whcih discuss about 400 Bad Request when sending email: Gmail api Sending email 400 bad request
Regarding the File size limit, Based from the Official Google Documentation, the maximum upload file size is the maximum amount of data you can store within method, you can make upload requests in any of the following ways:
Here's a SO ticket asking for size limit of email attachment: Gmail API - size limit batching of emails with attachments?