This is part two of how to get Google photos into Wappler via the API. I don’t have much time so am going to show the basics and hope you can work it out from there.
- Create a new Server Action. I called mine api_google_login
- Create a step adding Google as an OAuth2 Provider
- Add your client id and secret in the relavent fields
- Add an OAuth2 Authorize
- Select Google as the Provider
- Add the Scopes you want to use.
I’ve added:
- https://www.googleapis.com/auth/photoslibrary
- https://www.googleapis.com/auth/photoslibrary.readonly
-
https://www.googleapis.com/auth/userinfo.profile
You can read more about scopes here - https://developers.google.com/photos/library/guides/authorization
- Add a button or link on your page which links directly to the server action you just created. Mine is like this - Google Login
- Your users will be shown a Google Login for your site like this…
I haven’t done anything with showing a logout button if the user is already logged in.
Next Up - Getting User Data