I feel like I\'m missing something stupid...
I\'m using the PHP SDK for the new Gmail API to fetch an attachment from an email. I can get the attachment content, but un
Try the following to decode returned attachment data before writing it to file.
$attachment_data = urlsafe_b64decode(utf8_encode($data->data));
worked for me.