laravel-gmail icon indicating copy to clipboard operation
laravel-gmail copied to clipboard

setWatch() not working

Open ThomyLorenzatti opened this issue 2 years ago • 4 comments

Hello,

I am encountering an issue when trying to use the setWatch() function to get my Gmail messages in real-time. Everything is configured properly on the Google Cloud side and I have no errors, but I am not getting any response from the function as indicated in Google's documentation. On the Google Cloud side, nothing is happening. Here is my code for context:

$rq = new \Google_Service_Gmail_WatchRequest();
$rq->setLabelIds(['INBOX']);
$rq->setTopicName('projects/MY_PROJECT_NAME/topics/gmail');

$mailbox->setWatch('me', $rq);

Do you have any ideas to help me solve this issue? Thank you in advance.

ThomyLorenzatti avatar Jan 28 '23 15:01 ThomyLorenzatti

Hello, can you try

$mailbox->setWatch('[email protected]', $rq);

uacode avatar Jan 29 '23 09:01 uacode

Hello, can you try

$mailbox->setWatch('[email protected]', $rq);

I have already try this and it's the same thing that use 'me' because the user is currently login with his gmail account

ThomyLorenzatti avatar Jan 29 '23 14:01 ThomyLorenzatti

What in response? print_r($mailbox->setWatch('me', $rq));

uacode avatar Jan 29 '23 18:01 uacode