Unlock a 25% discount using BLOGIFY_25 coupon code

Blogify Public API

Blogify offers a public API available for all entities to consume. The API allows access to user-data through various endpoints via OAuth2 Authentication.

Table of Contents

  1. OAuth2
    1. OAuth2 Application Registration Process
      1. Application Name (required)
      2. Application Logo URL(required)
      3. Application Website (required)
      4. Application Brand Color (required)
      5. Application Description (required)
      6. Company Name (required)
      7. Company Homepage (required)
      8. Redirect URIs (at least one is required)
      9. Permissions (at least one is required)
      10. Documentation Link (required)
      11. Privacy Policy Link (required)
    2. Post-Registration Process
    3. Authentication
    4. Endpoints
      1. Authorization Request
        1. Query Parameters:
        2. Example:
        3. Redirection Example:
      2. Token Exchange
        1. Request Body:
        2. Response:
      3. Token Refresh
        1. Request Body:
        2. Response
    5. Using Access Tokens
  2. Public API Documentation
    1. Endpoints
      1. Fetch User Information
        1. Response
      2. Subscribe to Blog Notifications
        1. Request Body
        2. Response
      3. Unsubscribe from Blog Notifications
        1. Request Body
        2. Response
      4. Fetch Blogs
        1. Query Parameters
        2. Response

OAuth2

OAuth2 Application Registration Process

To register your application for OAuth2 authentication, you'll need to provide the following information:

Note: All text fields i.e. Application Name, Company Name, Application Description must contain only alphanumeric characters, spaces, hyphens, commas, parentheses, periods, or forward slashes.

Application Name (required)

  • A unique, concise name for your application (max 3 words, 30 characters)
  • Example: BlogSync Pro

Application Logo URL(required)

  • A direct link to your application's logo image
  • Example: https://example.com/logo.png

Application Website (required)

  • The main website for your application
  • Example: https://blogsync.example.com

Application Brand Color (required)

  • The primary color associated with your application's branding
  • Example: #4A90E2

Application Description (required)

  • A brief explanation of how your app integrates with Blogify.ai and its benefits (max 300 characters)
  • Example: BlogSync Pro seamlessly integrates with Blogify.ai to streamline content creation and publishing across multiple platforms, maximizing user engagement and productivity.

Company Name (required)

  • The name of the organization developing the application (max 30 characters)
  • Example: TechInnovate Solutions

Note: If your company name and application name are the same, use the same value for both fields.

Company Homepage (required)

  • The official website of your company
  • Example: https://techinnovate.example.com

Note: If your company's website and application's website are the same, use the same value for both fields.

Redirect URIs (at least one is required)

  • A list of allowed redirect URIs for your applciation
  • Example:
      "https://blogsync.example.com/callback, https://blogsync.example.com/callback/"
    

Permissions (at least one is required)

  • A list of requested scopes for your application
  • See Public API section for a list of available scopes
  • Example:
      "ReadBlog, ReadProfile, SubscribeBlog"
    
  • A URL to your application's documentation page for this Blogify Integration
  • Example: https://docs.blogsync.example.com

Note:

  • If your Blogify Integration has a dedicated page in your intgerations directory you can provide that link.
  • If your documentation is not prepared yet then provide a dummy link and make sure to update it later.
  • If you don't have official documentation for the Blogify Integration, you must still provide some documentation link e.g. a public Google Docs.
  • A URL to your application's privacy policy page
  • Example: https://blogsync.example.com/privacy

Post-Registration Process

After registering your application:

  1. Initial Status: Your app will remain private, accessible only to the developers.

  2. Making the App Public: To make your app available to all Blogify.ai users, you must request an app review:

    • Use the "Publish" button in the app portal to initiate the review process.
    • You will be notified via the Technical Support Chat System of any required modifications.
    • If your app meets all the guidelines, your app will be made public.
  3. Editing Capabilities:

    • Private Apps: All fields can be edited at any time.
    • Public Apps: All fields except for "Scopes" (permissions) can be edited.
  4. Requesting New Permissions:

    • For published apps requiring additional permissions, you must submit a request through the technical support chat system.

Authentication

This API uses OAuth 2.0 for authentication. Here's a step-by-step guide to obtain and use access tokens:

  1. Request Authorization: Direct the user to the consent screen to authorize your application.
  2. Receive Authorization Code: After user consent, you'll receive a short-lived authorization code.
  3. Exchange Code for Tokens: Use the authorization code to request an access token and refresh token.
  4. Use Access Token: Include the access token in your API requests for authentication.
  5. Refresh Access Token: When the access token expires, use the refresh token to obtain a new one.

Important Notes:

  • Access tokens are valid for 1 hour.
  • Authorization codes expire in less than 30 seconds.
  • Refresh tokens do not expire but can only be used once. A new refresh token is provided with each refresh.

Endpoints

Authorization Request

Redirect the user to this URL to start the OAuth 2.0 flow:

GET https://api.blogify.ai/oauth2/v1/connect

Query Parameters:

  • client_id (required): Your application's client ID from the Developer Portal.
  • redirect_uri (required): The URL to redirect after authorization. Must be registered in the Developer Portal.
  • response_type (required): Must be set to "code".
  • scope (required): Space-separated list of requested scopes. Must be a subset of the scopes registered in the Developer Portal.
  • state (required): A value to maintain state between the request and callback. Can be any string.

Example:

https://api.blogify.ai/oauth2/v1/connect?client_id=your_client_id&redirect_uri=https://your-app.com/callback&response_type=code&scope=ReadBlog%20ReadProfile&state=random_state_string

Once the user authorizes your application the user will be redirected to the callback URL with the authorization code and state as query parameters.

Redirection Example:

https://your-app.com/callback?code=received_authorization_code&state=random_state_string

Token Exchange

Exchange the authorization code for an access token and refresh token:

POST https://api.blogify.ai/oauth2/v1/token

Request Body:

{
  "grant_type": "authorization_code",
  "code": "received_authorization_code",
  "redirect_uri": "https://your-app.com/callback",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret"
}

Response:

{
  "access_token": "access_token_string",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "refresh_token_string"
}

Token Refresh

Refresh an expired access token:

POST https://api.blogify.ai/oauth2/v1/refresh

Request Body:

{
  "grant_type": "refresh_token",
  "refresh_token": "your_refresh_token",
  "client_id": "your_client_id",
  "client_secret": "your_client_secret"
}

Response

{
  "access_token": "new_access_token_string",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "new_refresh_token_string"
}

Using Access Tokens

To authenticate API requests, include the access token in the Authorization header:

Authorization: Bearer your_access_token

Remember to refresh your access token before it expires to maintain uninterrupted access to the API.

Public API Documentation

Endpoints

Fetch User Information

Retrieve information about the authenticated user and the company they belong to.

Required Scope: ReadProfile

GET https://api.blogify.ai/public-api/v1/me

Response

{
  "email": "[email protected]",
  "userName": "John Doe",
  "role": "user",
  "status": "active",
  "city": "New York",
  "country": "USA",
  "profilePicture": "https://example.com/profile.jpg",
  "businessName": "Acme Inc",
  "website": "https://www.acme.com",
  "interests": ["technology", "marketing"],
  "subscriptionPlan": "LIFETIME_BASIC",
  "subscriptionStatus": "active",
  "currentCredits": 1000,
  "monthlyCredits": 1000
}

Subscribe to Blog Notifications

Subscribe to receive blog data when user publishes a blog. When user chooses to publish a blog via your intgeration, the blog's information will be POSTed to the provided webhook URL. See fetch blogs endpoint for more details about blog posts.

Required Scope: SubscribeBlog

POST https://api.blogify.ai/public-api/v1/subscribe

Request Body

{
  "hookUrl": "https://example.com/webhook",
  "label": "My Webhook"
}

Response

{
  "id": "https://example.com/webhook",
  "message": "Subscribed successfully"
}

Unsubscribe from Blog Notifications

Unsubscribe from blog publish notifications.

Required Scope: SubscribeBlog

DELETE https://api.blogify.ai/public-api/v1/subscribe

Request Body

{
  "hookUrl": "https://example.com/webhook"
}

Response

No content (204 status code)

Fetch Blogs

Retrieve a list of blogs for the authenticated user.

Required Scope: ReadBlog

GET https://api.blogify.ai/public-api/v1/blogs?limit=20&offset=0

Query Parameters

  • limit (optional): The number of blogs returned
  • offset (optional): The starting index for returned blogs

Response

{
  "data": [
  {
    "title": "Sample Blog Post",
    "content": "This is a sample blog post content.",
  },
  // ... more blog entries
  ],
  "total" : 100,
}

Note: Please do not make your application rely on undocumented fields as they may change in the future.