With the Blogger API, you can create or manage your own blog on Blogger. You can also use the API to manage comments on your blog.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
blogger: {
type: "app",
app: "blogger",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/blogger/v3/users/self`,
headers: {
Authorization: `Bearer ${this.blogger.$auth.oauth_access_token}`,
},
})
},
})
Creates and publishes a new post or creates a new post as a draft. See the docs here.
Permanently removes a post (the deleted post cannot be restored anymore) See the docs here.
Revert a published or scheduled post to draft state.See the docs here.
Blogger uses OAuth authentication. When you connect your Blogger account, Pipedream will open a popup window where you can sign into Blogger and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Blogger API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/blogger
GET
https://accounts.google.com/o/oauth2/auth
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
access_type=offline
&
prompt=consent
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.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={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}