ForestSEO

Ghost Integration

Connect your Ghost blog to Forest SEO for automated content publishing using Admin API Key or Staff Access Token.

Connect your Ghost blog to Forest SEO for automated content publishing. Ghost integration supports two authentication methods for maximum flexibility.


โœ… Prerequisites

Before starting, ensure you have:

RequirementDetailsDocumentation
Ghost InstanceSelf-hosted or Ghost Proghost.org
Ghost Version3.0 or higherCheck in Ghost admin
Admin AccessAdministrator roleRequired for API key creation
Admin URLGhost admin panel URLUsually https://yourblog.com/ghost/

๐Ÿ” Authentication Methods

Ghost supports two authentication methods:

Format: {id}:{secret}

Example: 63af31d6d5e60cf73bf6730e:a7c4f3e8b2d9a1e6c5f7d8e9a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1

How to Get:

  1. Login to Ghost admin panel
  2. Go to Settings โ†’ Integrations
  3. Click + Add custom integration
  4. Name it "Forest SEO"
  5. Copy the Admin API Key (24 hex chars, colon, 64 hex chars)

Method 2: Staff Access Token

Format: JWT token (three base64url parts separated by dots)

When to Use:

  • For user-based authentication
  • When you need user-specific permissions
  • For multi-author workflows

๐Ÿš€ Setup Guide

Step 1: Create Custom Integration in Ghost

Detailed Steps:

  1. Access Ghost Admin

    • Navigate to https://yourblog.com/ghost/
    • Login with administrator credentials
  2. Create Integration

    • Click Settings (gear icon in sidebar)
    • Select Integrations tab
    • Click + Add custom integration button
    • Enter name: "Forest SEO"
    • Click Create
  3. Copy Credentials

    • Admin API Key โ€” The key in format id:secret (you'll need this)
    • API URL โ€” Your Ghost API endpoint (automatically detected from Admin URL)
    • Content API Key โ€” Not needed for Forest SEO (read-only)

Step 2: Connect in Forest SEO

In Forest SEO Dashboard:

  1. Navigate to Settings โ†’ Integrations

  2. Click "Add Integration"

  3. Select "Ghost"

  4. Fill in connection details:

FieldValueExample
NameIntegration identifier"My Ghost Blog"
Admin URLGhost admin panel URLhttps://yourblog.com/ghost/
API KeyAdmin API Key from Step 163af31d6d5e60cf73bf6730e:a7c...
  1. Click "Test Connection" to verify
  2. If successful, click "Save Integration"

โš™๏ธ How It Works

API Key Format Validation

Forest SEO validates your API key format:

Admin API Key: Must match pattern [24 hex chars]:[64 hex chars]

63af31d6d5e60cf73bf6730e:a7c4f3e8b2d9a1e6c5f7d8e9a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     24 hex chars                        64 hex chars

Staff Access Token: Must be valid JWT format (three parts separated by dots)

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     Header                      Payload                    Signature

๐Ÿ“ Content Publishing

Content Mapping

Forest SEO maps content to Ghost fields automatically:

Forest SEO FieldGhost FieldDescription
TitletitlePost title
ContenthtmlFull HTML content
Excerptcustom_excerptSummary text
SlugslugURL-friendly identifier
Featured Imagefeature_imageMain post image
TagstagsPost tags/categories
Meta Titlemeta_titleSEO title tag
Meta Descriptionmeta_descriptionSEO description

Supported Content Types

Rich Content:

  • โœ… HTML content
  • โœ… Markdown formatting
  • โœ… Images with captions
  • โœ… Code blocks
  • โœ… Embedded media

Ghost Cards:

  • โœ… Image cards
  • โœ… Markdown cards
  • โœ… HTML cards
  • โœ… Bookmark cards

๐Ÿงช Testing Your Integration

Connection Test

Test Checklist:

  1. Click "Test Connection" in integration settings
  2. Verify:
    • Admin URL is correct
    • API key format is valid
    • Ghost API is reachable
    • Write permissions granted
  3. Review test results
  4. Fix any issues
  5. Save integration

Test Publish

Steps:

  1. In Forest SEO, select an article
  2. Click "Publish" โ†’ "Ghost"
  3. Set status to "draft"
  4. Click "Publish Now"
  5. Wait for confirmation
  6. Check Ghost Admin:
    • Navigate to Posts section
    • Find the published draft
    • Verify all content fields
    • Check images uploaded correctly
    • Review tags and metadata

๐Ÿ”ง Troubleshooting

Common Issues


401 Unauthorized

Problem: Authentication fails

Causes:

  • Invalid Admin API Key
  • Key was regenerated in Ghost
  • Wrong key format

Solutions:

  1. Regenerate Key:

    • Go to Ghost Settings โ†’ Integrations
    • Delete old "Forest SEO" integration
    • Create new integration
    • Copy new Admin API Key
  2. Verify Format:

    • Key should be 24hexchars:64hexchars
    • Contains exactly one colon (:)
    • Only lowercase hex characters (0-9, a-f)

404 Not Found

Problem: Ghost API endpoint not found

Causes:

  • Incorrect Admin URL
  • Ghost instance not running
  • Network issues

Solutions:

IssueFix
Wrong URLUse https://yourblog.com/ghost/ (with /ghost/)
Missing SlashAdd trailing slash to Admin URL
HTTP vs HTTPSEnsure protocol matches your Ghost setup
DomainVerify domain is correct and accessible

Invalid API Key Format

Problem: "Invalid API key format" error

Expected Formats:

Admin API Key:

Pattern: /^[a-f0-9]{24}:[a-f0-9]{64}$/
Example: 63af31d6d5e60cf73bf6730e:a7c4f3e8b2d9a1e6c5f7d8e9a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1

Staff Access Token:

Pattern: JWT with 3 parts separated by dots
Example: eyJhbGciOi...{payload}...{signature}

Debugging:

  1. Check for extra spaces
  2. Verify colon position (if Admin API Key)
  3. Ensure entire key was copied
  4. Try regenerating the key

๐Ÿ“š Ghost-Specific Features

Content Features

Featured Posts:

  • Mark posts as featured in Ghost
  • Appear in featured section
  • Controlled via Ghost settings

Internal Tags:

  • Use tags starting with # for organization
  • #forest-seo โ€” Identify auto-generated content
  • #review-needed โ€” Flag for editorial review
  • Internal tags don't appear publicly

Visibility Options:

  • Public โ€” Visible to everyone
  • Members โ€” Free members and above
  • Paid โ€” Paid subscribers only

๐Ÿ”— Integration with Features

With Content Generation

  • Generate AI content
  • Publish as draft or public
  • Auto-create tags

Learn more about Content โ†’

With Schedules

  • Automate publishing
  • Batch operations
  • Scale to 100+ posts/month

Learn more about Schedules โ†’


๐Ÿ“š Resources


๐Ÿ’ก Best Practices

API Key Security

  • Never share your Admin API Key
  • Regenerate keys if compromised
  • Use separate integrations for different projects
  • Monitor usage in Ghost analytics

Content Publishing

  • Test first with draft status
  • Review content before publishing
  • Use tags for organization
  • Set featured images for better engagement

Monitoring

  • Check sync status regularly
  • Review failed publications in Forest SEO
  • Monitor Ghost for published content
  • Track performance with Ghost analytics