Aautoranko

Getting started

WordPress integration

The Autoranko WordPress plugin connects a site once; from then on the API drives it from anywhere. This page explains how the pieces fit. For the setup itself, see How it works.

How the pieces fit

WordPress site

The Autoranko plugin registers the site, shows the 6-digit connection code and syncs your posts.
registers, syncs postspublishes posts

Autoranko

Keeps the site record, the synced articles and your jobs; writes the articles and publishes them.
API calls with your tokensigned webhooks

Your code

Lists sites, reads articles, creates and approves jobs, and listens for webhooks.

Your code never talks to WordPress directly. The API works on the records Autoranko keeps for each connected site, and Autoranko makes the WordPress calls. That's why one token can drive every site on your account, wherever they're hosted.

Connecting a site

Connecting happens in WordPress and the Autoranko dashboard, because it needs a WordPress administrator. There are no API endpoints for it. Each step changes what the API shows:

StepWhat happensIn the API
1. Install the pluginActivating the plugin registers the site with Autoranko. The site exists, but no account owns it yet.Not listed: GET /sites shows only sites your account owns.
2. Claim it with the 6-digit codeThe plugin shows a 6-digit code in wp-admin. Enter it in your Autoranko dashboard to link the site to your account. Codes work once and expire after 24 hours.Listed in GET /sites. Its plan follows your subscription.
3. Authorize publishingApprove Autoranko on WordPress's own Authorize Application screen. WordPress creates an application password for Autoranko, which stores it encrypted.wp_connected turns true: jobs can be published.
4. SyncThe plugin sends your posts to Autoranko, every post and not only the ones Autoranko wrote, and keeps sending changes.GET /sites/{id}/articles lists them, each at its latest version.

Once step 2 is done, everything else can run from the API: generating, reviewing and publishing articles, reading the synced content and researching keywords. Start with the quickstart.

Publishing to WordPress

When a job is published (by POST /jobs/{id}/publish, or by itself with auto_publish), Autoranko creates the post through the WordPress REST API, signed in with the application password from step 3. The post goes live right away:

Job fieldWordPress post
article_titleTitle
article_htmlContent
meta_descriptionExcerpt
StatusPublished (publish), not a draft

The post's ID comes back on the job as wp_post_id, and job.published carries its URL in wp_link. If WordPress refuses the post, the job goes back to review with the reason in error, and job.review fires with publish_error: true.

Taking publishing access back

Disconnecting in the plugin deletes the stored credential and sets wp_connected to false. Revoking Autoranko's application password in WordPress (Users → Profile → Application Passwords) also stops publishing, but Autoranko only finds out at the next publish attempt, which then fails with an error on the job.

Site states in the API

These fields of the site object (GET /sites, GET /sites/{id}) reflect the WordPress side. Check wp_connected and is_active before relying on publishing.

Site field
  • domainstring
    The site's hostname. A domain can be registered only once across Autoranko.
  • planstring
    The plan this site's limits are enforced against. It mirrors the owner's subscription.

    One offreestarterpro

  • is_activeboolean
    false once the Autoranko plugin has been deleted from the WordPress site; true again if the plugin registers the site again.
  • wp_connectedboolean
    true when Autoranko is authorized to publish to the site's WordPress. Publishing (POST /jobs/{id}/publish or auto_publish) needs it.

Full site object: Sites reference.

Plugin keys and API tokens

Three credentials are involved, and only one of them is yours to use:

CredentialCreatedUsed for
API token ar_live_…By you, in Dashboard → APIYour code calling the API, for every site on your account. Authentication
Plugin site keyAutomatically, when the plugin registers the siteThe plugin talking to Autoranko, and nothing else. It isn't an API token: the public API rejects it with 401 invalid_token.
WordPress application passwordBy WordPress, when you authorize publishingAutoranko publishing posts to that one site. Stored encrypted; revoke it in WordPress at any time.