laravel-gmail
laravel-gmail copied to clipboard
setWatch() not working
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.
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
What in response? print_r($mailbox->setWatch('me', $rq));