Gmail api. How to get message labels
<p>How to get message labelIds from <code>Google_Service_Gmail_Message</code> or by messageId</p>

<p>something like that:</p>

<pre><code>$messages = $gmailService()-&gt;users_messages-&gt;listUsersMessages('me', ['q' =&gt; 'newer_than:1d in:anywhere']);

foreach ($messages as $message) {
    $messageLabels = $message-&gt;getLabelIds();
}
</code></pre>