Der-Henning / tgtg

Scanner for Too Good To Go Notifications
https://github.com/Der-Henning/tgtg/wiki
GNU General Public License v3.0
411 stars 66 forks source link

How do I find TGTG ItemIDs to add to config file? #122

Closed asiroka closed 2 years ago

Der-Henning commented 2 years ago

Hi @asiroka. In any regular use case you don't have to add the ItemIDs to your config. The scanner will automatically scan the items you marked as favorite in the TGTG App. The ItemIDs option is a leftover from earlier implementations and remains for backwards compatibility.

If you still want to use this feature you can use the helper.py module to figure out the ItemIDs. But that's an advanced use case and generally not necessary.

asiroka commented 2 years ago

Thanks for the quick reply. I am a total newbie and could use a bit more guidance on how to edit the config.ini.

Should I put my email and password in here? Do I have to edit the sender e-mail? Thanks a lot - will spread the word about this scanner!

[SMTP] enabled = true Host = smtp.gmail.com Port = 465 Username = yourname@gmail.com Password = TLS = true Sender = max.mustermann@gmail.com Recipient = max.mustermann@gmail.com

Der-Henning commented 2 years ago

Put your Too Good To Go Login email address into this field:

[TGTG]
Username = yourtgtgloginemail@example.com

After the first start of the scanner you will be asked to click on the activation link send to you by TGTG to authenticate the scanner.

The settings for SMTP, PUSHSAFER, IFTTT, TELEGRAM and WEBHOOK are for different notification systems. You can activate these by setting

enabled = true

Using the email notifications aka SMTP with gmail requires you to create an app password for your google account since the scanner cannot use googles two-factor authentication. Click here for more information: Sign in with App Passwords

Your SMTP config will look something like this:

[SMTP]
enabled = true
Host = smtp.gmail.com
Port = 465
Username = yourname@gmail.com
Password = YourGeneratedAppPassword
TLS = true
Sender = yourname@gmail.com
Recipient = yourname@gmail.com

To receive real time notifications by mail you have to make sure you receive the email directly by push and not pull them in a fixed time interval. I would recommend using the telegram notification service.

Please try to avoid posting actual account informations like your mail address or passwords.