# Integration Flarum -\> Ghost API (Python script)

**URL:** https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000
**Category:** Share & showcase
**Created:** [January 9, 2024, 7:54pm UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000 "2024-01-09T19:54:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AnimaVillis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/animavillis/32/27600_2.png) [@AnimaVillis](https://forum.ghost.org/u/AnimaVillis)
#### Post date: [January 9, 2024, 7:54pm UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/1 "2024-01-09T19:54:14Z")

</div>

Hey Community,

I wanted to share an exciting integration script that automates the process of posting Ghost blog articles to Flarum forum. This integration allows for seamless content sharing and updates between the two platforms, enhancing our community experience.

### Key Features:

- **Automated Updates:** The script automatically fetches new posts from the Ghost blog and creates corresponding topics on the Flarum forum.
- **Tag Support:** Posts on Flarum are tagged with relevant identifiers for easy categorization and searchability.
- **Discord Notifications:** Receive real-time notifications on Discord for successful updates or any encountered errors.

### How It Works:

1. The script retrieves posts from the Ghost API.
2. For each new post, it creates a formatted topic on the Flarum forum.
3. Discord notifications are sent to keep everyone informed about the integration status.

### Get Involved:

- **Try It Out:** You can find the script [GitHub](https://github.com/AnimaVillis/ghostflarumintegration).
- **Provide Feedback:** Share your thoughts, suggestions, or report any issues you encounter.
- **Contribute:** If you’re a Python enthusiast, feel free to contribute to the script’s development.

### Installation Guide:

1. Obtain API keys for Ghost and Flarum.
2. Replace placeholder values in the script with your API keys and webhook URL.
3. Customize the Flarum tags and other settings according to your forum structure.
4. Run the script periodically using a scheduler like Cron.

Let’s make our community even more connected and efficient with this Ghost to Flarum integration! If you have any questions, ideas, or feedback, feel free to jump into the discussion below.

Happy integrating!

---

<div class="post-metadata">

### Author: ![AnimaVillis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/animavillis/32/27600_2.png) [@AnimaVillis](https://forum.ghost.org/u/AnimaVillis)
#### Post date: [January 12, 2024, 9:49am UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/2 "2024-01-12T09:49:21Z")

</div>

**UPDATE**

Add configuration checks for Ghost and Flarum APIs

Enhance the script by adding configuration checks to ensure the validity of the Ghost and Flarum API configurations. The changes include:

1. Added a new function `check_ghost_config` to verify the Ghost API configuration before attempting to fetch posts.
2. Modified the `get_ghost_posts` function to include the `check_ghost_config` call.
3. Added a new function `check_flarum_config` to verify the Flarum API configuration before attempting to create a new post.
4. Modified the `create_flarum_post` function to include the `check_flarum_config` call.

Now, the script will raise exceptions with appropriate error messages if the API configurations are incorrect, preventing further execution in such cases.

---

<div class="post-metadata">

### Author: ![AnimaVillis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/animavillis/32/27600_2.png) [@AnimaVillis](https://forum.ghost.org/u/AnimaVillis)
#### Post date: [January 14, 2024, 11:02am UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/3 "2024-01-14T11:02:12Z")

</div>

**UPDATE**

- Added information about necessary python packages that need to be installed using pip.
- Added examples dir - feature image and content

If someone need more examples for use, feel free to comment or open an issue on [GitHub - AnimaVillis/ghostflarumintegration](https://github.com/AnimaVillis/ghostflarumintegration/tree/main)

---

<div class="post-metadata">

### Author: ![KBExit](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kbexit/32/38359_2.png) [@KBExit](https://forum.ghost.org/u/KBExit)
#### Post date: [June 4, 2025, 2:20pm UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/4 "2025-06-04T14:20:30Z")

</div>

What are you doing for membership?

---

<div class="post-metadata">

### Author: ![AnimaVillis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/animavillis/32/27600_2.png) [@AnimaVillis](https://forum.ghost.org/u/AnimaVillis)
#### Post date: [June 5, 2025, 6:01pm UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/5 "2025-06-05T18:01:24Z")

</div>

What membership are you referring to?

My blog was free so I didn’t assume there was any need to verify the user based on whether they had a membership package.

---

<div class="post-metadata">

### Author: ![KBExit](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kbexit/32/38359_2.png) [@KBExit](https://forum.ghost.org/u/KBExit)
#### Post date: [June 5, 2025, 6:37pm UTC](https://forum.ghost.org/t/integration-flarum-ghost-api-python-script/44000/6 "2025-06-05T18:37:24Z")

</div>

I see, I was hoping for a user base synchronized system. That way they can just register once and login just once. Thanks though!
