Access Google Bard via API

Yesterday, I was trying to access Bard API via Rust

The task is WIP because :

  1. I’m still learning Rust (Although on Day 5 I was able to access a URL from rust code)
  2. I didn’t know how to access Bard API

It started with a Youtube video that:

  • Uses python code which uses Bard library
    • Not sure if it is official one or third party one
    • In either case it won’t be directly useful in rust code
  • Uses a hack to get session cookie from browser (which will expire sooner or later)

At that time, I didn’t know whether Google has made Bard API accessible via an API

Continue Reading »