A simple implementation of Google bard in Telegram
Just require your telegram bot token and Google bard API key
Go to @Botfather on telegram to Get your bot token, after getting just replace it with "YOUR_BOT_TOKEN".
To get Your Bard API:
- Visit https://bard.google.com/
- F12 for console
- Session: Application → Cookies → Copy the value of
__Secure-1PSID
cookie.
Note that while I referred to __Secure-1PSID
value as an API key for convenience, it is not an officially provided API key.
Cookie value subject to frequent changes. Verify the value again if an error occurs. Most errors occur when an invalid cookie value is entered.
After getting the API KEY replace it with 'YOUR_BARD_API'
The bot is now free to use.
Libraries Used are