I am converting a page to google AMP and need to access cookies to set a view of a division. I am thinking of creating an API for this.
The API will just return all the
Using amp-list is the right approach in this case. amp-list makes a request to your server, which can read the cookie and return an appropriate JSON response. You can render then the form / button inside the amp-list using amp-mustache.
This samples demonstrates how to do this: https://ampbyexample.com/advanced/favorite_button/.