Google Photos is a photo sharing and storage service developed by Google. It was announced at the Google I/O conference on May 28, 2015. It allows users to store, share, and edit photos and videos. The service also provides a suite of tools for developers to build photo-sharing applications.
The Google Photos API provides a set of tools that developers can use to build applications that enable users to share and edit photos and videos. The API lets developers create, view, and edit albums, photos, and videos; upload and download photos and videos; and search for photos and videos.
Albums, photos, and videos can be shared with other users, and users can add comments to photos and videos. The API also provides a set of tools for developers to build photo-sharing applications.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_photos: {
type: "app",
app: "google_photos",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.google_photos.$auth.oauth_access_token}`,
},
})
},
})
Adds selected items to the selected album. See the documentation
Sets an album shareable. Returns a share token and url. See the documentation
Google Photos uses OAuth authentication. When you connect your Google Photos account, Pipedream will open a popup window where you can sign into Google Photos and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google Photos API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata
https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
https://www.googleapis.com/auth/photoslibrary
https://www.googleapis.com/auth/photoslibrary.appendonly
https://www.googleapis.com/auth/photoslibrary.sharing
https://www.googleapis.com/auth/photoslibrary.readonly
GET
https://accounts.google.com/o/oauth2/auth
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
prompt=consent
&
access_type=offline
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}