A Simple PHP POST API for Ghost to Create Blog Post using Ghost Admin API 📝
- Active Ghost Site
- Server with PHP Support for Running the API
- PHP cURL
- SSL for Secure Connection
Open config.php
file
- Replace
http://localhost:2368
with your Ghost Domain (Line 9) - Replace
someone@example.com
with your Ghost Username (Line 19) - Replace
mysecurepassword
with your Ghost Password (Line 20)
- Create Session and Auth your Ghost site
- Just Open the Below URL format on Browser and Create Ghost API Session
https://api.example.com/ghlogin.php
- Create a New Post - This is Just a PHP API Endpoint
https://api.example.com/post.php?title=Post%20via%20API&html=Hello%20world%20My%20new%20post%20via%20API
- User Authentication - https://ghost.org/docs/admin-api/#user-authentication
- Create Post - https://ghost.org/docs/admin-api/#creating-a-post
MIT