Integrations / WordPress.com
WordPress.com
WordPress.com sites: read your account, your sites and their posts.
4 actions
OAuth 2
4 read0 write
Calls public-api.wordpress.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "wordpress" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
global | Access all of your WordPress.com sites |
Actions
Get my WordPress.com profilereadwordpress.get_meGet the connected WordPress.com user's id, username, display name and primary site id.
Needs scope: global
No input.
await setu.execute({
userId: "user_1",
action: "wordpress.get_me",
input: {},
});Get postreadwordpress.get_postGet one post of a WordPress.com site, with its title, content, status and URL.
Needs scope: global
| Input | Type | Description | |
|---|---|---|---|
site | string | Required | Site id or domain |
post_id | integer | Required |
await setu.execute({
userId: "user_1",
action: "wordpress.get_post",
input: {
"site": "<site>",
"post_id": 1
},
});List postsreadwordpress.list_postsList posts of a WordPress.com site by status, with optional text search and paging.
Needs scope: global
| Input | Type | Description | |
|---|---|---|---|
site | string | Required | Site id or domain, for example example.wordpress.com |
status | string | Optional | |
search | string | Optional | |
number | integer | Optional | Max 100, default 20 |
page | integer | Optional | 1-indexed |
order_by | string | Optional | |
order | string | Optional |
await setu.execute({
userId: "user_1",
action: "wordpress.list_posts",
input: {
"site": "<site>"
},
});List my sitesreadwordpress.list_sitesList the WordPress.com sites the connected user belongs to (ids and titles).
Needs scope: global
No input.
await setu.execute({
userId: "user_1",
action: "wordpress.list_sites",
input: {},
});