An example Go application using Google Photos Library API.
- Open https://console.cloud.google.com/apis/credentials
- Create an OAuth client ID where the application type is other.
- Set the following environment variables:
export GOOGLE_CLIENT_ID=
export GOOGLE_CLIENT_SECRET=
./hello-google-photos photo1.jpg photo2.jpg
The photos will be uploaded to your Google Photos Library.
This depends on google/google-api-go-client.
It does not provide media uploads and this implements it using http.Client
.
This does not persist an access token. You must do browser authentication every time.
This supports does not support a service account.