You're on the perfect track :-) you can use pwg.session.login to get connected. Either you connect at each script execution, or you save your session identifier in a cookie.
I use Symphony CMS for websites, and I'm hoping that one Piwigo installation can be used as a central image store from which different sites can read "their" galleries.
Symphony is great at using XML, so I'd like to use the Piwigo API and to allow customers with Symphony sites to login at Piwigo to add images/galleries.
From looking at the API demo it looks like a Piwigo user can be logged in through it, so I'm thinking if each site knows its Piwigo user account details it can login and will then have access to private galleries that that user does (and not other private galleries that that user doesn't have access to). Hopefully each client can be kept separated from the others.
Am I on the right track, or is there a better way I could use the API while ensuring that each site only gets the images intended for it?
I'll get it installed and give it a try, but any advice would be appreciated. Thanks.