Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setWatch() not working #246

Open
ThomyLorenzatti opened this issue Jan 28, 2023 · 3 comments
Open

setWatch() not working #246

ThomyLorenzatti opened this issue Jan 28, 2023 · 3 comments

Comments

@ThomyLorenzatti
Copy link

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.

@uacode
Copy link
Contributor

uacode commented Jan 29, 2023

Hello, can you try

$mailbox->setWatch('login@gmail.com', $rq);

@ThomyLorenzatti
Copy link
Author

ThomyLorenzatti commented Jan 29, 2023

Hello, can you try

$mailbox->setWatch('login@gmail.com', $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

@uacode
Copy link
Contributor

uacode commented Jan 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants