Goodness-Chukwudi / gmail-client

1 stars 0 forks source link

what is the GOOGLE_TOPIC_NAME? #1

Open fadbad opened 2 months ago

fadbad commented 2 months ago

Hello, great work... What's the GOOGLE_TOPIC_NAME in .env?? Please advise

Goodness-Chukwudi commented 1 month ago

Using Google's Pub/Sub (aka webhooks) api you can create a topic and listen to it for changes. That way you don't need polling to get your email updates. That's what this line await gmail.users.watch({userId: email || 'me', requestBody: {topicName: topicNameOrId}}), does.