NAV Navbar
javascript Request Response
  • Introduction To Metype
  • Comments
  • Activity Feed
  • User Generated Content (UGC)
  • Single Sign On(SSO)
  • Third party login
  • Install Metype on Wordpress
  • Install Metype on Blogger
  • Page Metadata Script
  • API Documentation
  • Organization API Documentation
  • Release Notes
  • Introduction To Metype

    Metype is a platform for increasing user engagement. It can be embedded with any web page or mobile app. There are several components of Metype that can be integrated into your site to increase your user engagement. A summation of all these tools will help you funnel your user's engagement.

    Products

    Vision

    Metype is envisioned to be a one stop shop for all users engagement. It not only provides tools for user engagement but aims to give engage users when they are not on your property too. The power of audience engagement is something no one can underestimate and metype aims to provide it's customers all the tools for them to manage and target users and monetize.

    Comments

    Metype provides a commenting system for your users to engage with your content.

    Terminology - Comments

    Installation - Comments

    Prerequisites

    Javascript

    <!-- Initialization Script -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    <!-- Javascript to render the widgets -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script> -->
    
    <!-- Commenting Widget embed code. Html Element with the necessary attributes.
    The color and font are configurable according to your liking -->
    <div id='metype-container'
         class='iframe-container'
         data-metype-account-id='XXXXX' <!-- Add your account ID here -->
         data-metype-host='https://www.metype.com/'
         data-metype-primary-color='#0987d5' <!-- Majority color of the widget can be customised -->
         data-metype-bg-color='#ffffff' <!-- Background color of the widget can be customised -->
         data-metype-font-color='#4a4a4a' <!-- Font color of the widget can be customised -->
         data-metype-comment-widget-id="comment-widget-x1"> <!-- Unique Id if you want to embed multiple comment widgets in the same page -->
    </div>
    <script type='text/javascript'>
      var metypeContainer = document.getElementById("metype-container"),
        page_url = metypeContainer.getAttribute("data-metype-page-url");
    
      //You can change the page url incase of infinite scroll to render different widgets.
      metypeContainer.setAttribute('data-metype-page-url', page_url || window.location.href);
    
      // The rest of the commands are for metype to render the widget as an iframe
      metypeContainer.setAttribute('data-metype-window-height', window.innerHeight);
      metypeContainer.setAttribute('data-metype-screen-width', window.screen.width);
      talktype(function() {
        talktype.commentWidgetIframe(metypeContainer);
      });
    </script>
    

    Comments Count API

    GET https://www.metype.com/api/v1/accounts/:account_id/pages?page_ids=base_64_enc_string1,base_64_enc_string2
    
    [
        {
            "url": "http://www.example.com/1",
            "comments_count": 1
        },
        {
            "url": "http://www.example.com/2",
            "comments_count": 1
        }
    ]
    

    Activity Feed

    Metype provides a feed to represent audience activity on your site.

    Terminology - Feed

    Installation - Feed

    Prerequisites

    Javascript

    <!-- Initialization Script -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    <!-- Javascript to render the widgets -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script> -->
    
    <!-- Feed Widget embed code. Html Element with the necessary attributes.
    The color and font are configurable according to your liking -->
    <div id='feed-metype-container'
         class='feed-iframe-container'
         data-metype-account-id='XXXXX'
         data-metype-host='https://www.metype.com/' <!-- Add your account ID here -->
         data-metype-publisher='John Doe' <!-- Add the name that needs to appear on the feed here -->
         data-metype-primary-color='#0987d5' <!-- Majority color of the widget can be customised -->
         data-metype-secondary-color='#ffffff'> <!-- Background color of the widget can be customised -->
      <!-- This is a clickthru button on the right side of the web page. A click of this will open the feed. -->
      <div id='metype-clickthru' class='metype-clickthru' onClick="talktype.toggleButton()"></div>
    
      <!-- This is to close the feed -->
      <div class="metype-feed-slide-icon" id="metype-feed-slide-icon" onclick="talktype.slideButton()"></div>
    </div>
    
    <script type='text/javascript'>
      // This is required to render the iframe.
      talktype(function() {
        talktype.feedWidgetIframe(document.getElementById('feed-metype-container'));
      });
    </script>
    

    User Generated Content (UGC)

    Metype provides a form called user generated content to enable users to submit their opinions and views.

    Terminology - UGC

    Installation - UGC

    <!-- Initialization Script -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    <!-- Javascript to render the widgets -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script> -->
    
    <div id='contribution-container'
        data-metype-account-id='XXXXX' <!-- Add your account ID here -->
        data-metype-host='https://www.metype.com/'>
    </div>
    <script type='text/javascript'>
      // This code is used to render the UGC iframe.
      talktype(function() {
        talktype.contributionWidgetIframe(document.getElementById('contribution-container'));
      });
    </script>
    

    Prerequisites

    Javascript

    Single Sign On(SSO)

    Metype enables property owners to manage identity of users by providing a login and sign in service. Currently Metype allows social logins like Facebook, Twitter and Google Plus.

    SSO - Terminology

    SSO - Prerequisites

    <!-- Initialization Script -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    <!-- Javascript to render the widgets -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script> -->
    

    Integration - Authorization Code Flow

    http://www.metype.com/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=REDIRECT_URL&response_type=code
    
    POST https://www.metype.com/oauth/token
    {
        grant_type: authorization_code,
        client_id: YOUR_CLIENT_ID,
        client_secret: YOUR_CLIENT_SECRET,
        code: PASS_CODE_PARAM_HERE,
        redirect_uri: YOUR_REDIRECT_URI
    }
    
    {
        "access_token": "TOKEN",
        "token_type": "bearer",
        "expires_in": EXPIRY_IN_SECONDS,
        "created_at": 1526984201
    }
    
    GET https://www.metype.com/api/v1/current_user.json?access_token=TOKEN
    
    {
        current_user: {
            id: 1,
            name: "JOHN DOE",
            avatar: "https://www.example.com/image.png",
            bio: "I am awesome",
            slug: "john-doe"
        }
    }
    

    This user can be hashed and maintained in a session cookie or repeated requests to Metype can be made to get the user details. The OAuth libraries will handle the rest in the application if you have integrated with one.

    Integration - iframe

    <div class="sso-login-iframe-parent">
    <div id="form-login-container" class="form-login-container"></div>
    <script type="text/javascript">
        talktype(function() {
            const formContainer = document.getElementById("form-login-container"),
                  metypeHost= "https://www.metype.com",
                  clientId = "SSO_CLIENT_ID",
                  redirectUri = "REDIRECT_URI",
                  source = `https://www.metype.com/oauth/authorize?client_id=${clientId}&redirect_uri=${redirectUri}&response_type=code` ;
    
            talktype.formLoginIframe(formContainer, source, callback);
    });
    </script>
    </div>
    

    Allows Publishers to integrate sso on their website via an iframe.

    Parameter Type Mandatory Description
    SSO_CLIENT_ID string Yes The SSO client identifier which can be found in Embed Codes page on Metype Admin.
    REDIRECT_URI string Yes The redirect URI(s) which are under Valid Redirect URIs for Sign-In in the Settings page on Metype Admin.
    callback function No A function the client can execute after a successful SSO Login.

    Use the script on the right hand side to load SSO in an iframe.

    Third party login

    Metype lets you any third party authentication system to login users to Metype on your website. Metype uses shared key authentication method to implement this.

    Third party login - Terminology

    Third party login - Prerequisites

    Generating JWT

    Posting user data to Metype using login callback

        talktype.accountUserLogin({
          name: 'batman',
          avatar: 'https://gothamcity.com/batman-photo.jpg',
          jwt: 'jwtForTheBatman'
        });
    

    Logout callback

      talktype.accountUserLogout();
    

    Listening to Metype to initiate login

    function listenToLogin(event) {
          if(event.data.action === "metype_login") {
            login();
          }
        }
    window.addEventListener("message", listenToLogin, false);
    

    Install Metype on Wordpress

    Metype Comments on Wordpress

    Follow the steps below to start using the Metype Commenting widget on your Wordpress site.

    1. Sign up for an account @ https://www.metype.com.
    2. You will will be redirected to @ https://www.metype.com/admin.
    3. Go to the Embed Metype section.
    4. Make a note of your Metype Account ID. Wordpress Installation EmbedMetype
    5. Now visit your Wordpress admin page. E.g. yourwebsite.com/wp-admin.
    6. Go to Plugins and click on Add new.
    7. Search for Metype.
    8. You’ll find Metype by Quintype Technologies India Pvt Ltd.
    9. Click on Install Now.
    10. Click on Activate.
    11. On the Wordpress admin page, click on the Metype section.
    12. Enter your Metype Account ID, and press Save Changes. Wordpress Installation WP Admin
    13. The Metype commenting widget will now begin to appear in all of your WordPress pages.

    Metype Feed on Wordpress

    1. Follow the steps mentioned above.
    2. In the Wordpress admin page, check the box with the configuration name Enable Feed widget and Save Changes.
    3. The Metype feed widget will now begin to appear in all of your Wordpress pages.

    Install Metype on Blogger

    Metype Comments on Blogger

    <!-- Script for Blogger -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    
    <!-- Commenting Widget embed code. Html Element with the necessary attributes.
    The color and font are configurable according to your liking -->
    <div id='metype-container'
         class='iframe-container'
         data-metype-account-id='XXXXX'
         data-metype-host='https://www.metype.com/'
         data-metype-primary-color='#0987d5'
         data-metype-bg-color='#ffffff'
         data-metype-font-color='#4a4a4a'>
    </div>
    
    <script type='text/javascript'>
      var metypeContainer = document.getElementById("metype-container"),
        page_url = metypeContainer.getAttribute("data-metype-page-url");
    
      //You can change the page url incase of infinite scroll to render different widgets.
      metypeContainer.setAttribute('data-metype-page-url', page_url || window.location.href);
    
      // The rest of the commands are for metype to render the widget as an iframe
      metypeContainer.setAttribute('data-metype-window-height', window.innerHeight);
      metypeContainer.setAttribute('data-metype-screen-width', window.screen.width);
      talktype(function() {
        talktype.commentWidgetIframe(metypeContainer);
      });
    </script>
    
    <!-- Script that loads the metype library. This can be moved to the head -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script>
    

    Follow the steps below to install the Metype Comments widget on your Blogger website.

    1. Navigate to Settings -> Posts, comments and sharing -> Comments.
    2. Choose the Hide option in the Comment Location dropdown.
    3. Click on Layout on the left handside.
    4. Click on Add a Gadget in the layout.
    5. Click on HTML/Javascript.
    6. Check the Show HTML/Javascript checkbox.
    7. Type Metype Comments in the title field.
    8. Add the script for Blogger specified in the shell on the right in this section in the content field. Dont forget to add your account id and other UI customizations in the script.
    9. Click on Save at the end of the page.
    10. Now the Metype Comments gadget is available in your layout. You can move it as per your requirements in your posts layout.

    Metype Feed on Blogger

    <!-- Script for Blogger -->
    <script type='text/javascript'>
      window.talktype = window.talktype || function(f) {
        if (talktype.loaded)
          f();
        else
          (talktype.q = talktype.q || []).push(arguments);
      };
    </script>
    
    <!-- Feed Widget embed code. Html Element with the necessary attributes.
    The color and font are configurable according to your liking -->
    <div id='feed-metype-container'
         class='feed-iframe-container'
         data-metype-account-id='XXXXX'
         data-metype-host='https://www.metype.com/'
         data-metype-publisher='John Doe'
         data-metype-primary-color='#0987d5'
         data-metype-secondary-color='#ffffff'>
      <!-- This is a clickthru button on the right side of the web page. A click of this will open the feed. -->
      <div id='metype-clickthru' class='metype-clickthru' onClick="talktype.toggleButton()"></div>
    
      <!-- This is to close the feed -->
      <div class="metype-feed-slide-icon" id="metype-feed-slide-icon" onclick="talktype.slideButton()"></div>
    </div>
    
    <script type='text/javascript'>
      // This is required to render the iframe.
      talktype(function() {
        talktype.feedWidgetIframe(document.getElementById('feed-metype-container'));
      });
    </script>
    
    <!-- Script that loads the metype library. This can be moved to the head and called only once -->
    <script src='https://www.metype.com/quintype-metype/assets/metype.js'></script>
    

    Follow the steps below to install the Metype Feed widget on your Blogger website.

    1. Click on Layout on the left handside.
    2. Click on Add a Gadget in the layout.
    3. Click on HTML/Javascript.
    4. Check the Show HTML/Javascript checkbox.
    5. Leave the title empty.
    6. Add the script for Blogger specified in the shell on the right in the content field. Dont forget to add your account id and other UI customizations in the script.
    7. Click on Save at the end of the page.
    8. Now the gadget is available in your layout. You can move it as per your requirements. Normally the feed is called only once.

    Page Metadata Script

    Metype provides a script to add metadata to a page. A Page is a resource created when any of the Metype widgets are used. By setting the desired value of Metadata, you can later query using Metype APIs for detailed metrics.

    Page Metadata Javascript

    Use this script when you want to save some details of a page that you might want to use for querying using APIs.

    <script type="text/javascript">
              talktype(function() {
                var pageUrl = <url_here>; <!-- Add url of the page here here -->
                var pageMetadata = <metadata_object_here>; <!-- Add pageMetdata object here -->
                var accountId = 'XXXXX'; <!-- Add your account ID here -->
                talktype.pageMetadataSetter(accountId, pageUrl, pageMetadata);
              });
    

    pageMetadata must be a single level javascript object. The values can be of type String, Number, Array. It can not be a nested object.

    Some examples of valid metadata objects are:

    API Documentation

    GET Account Reactions

    curl -X GET \
      https://www.metype.com/api/v1/accounts/<account_id>/reactions \
      -H 'Content-Type: application/json'
    
    
    {
        "account_reactions": [
            {
                "id": 6,
                "name": "Happy",
                "created_at": "2019-07-18T13:58:53.374Z",
                "updated_at": "2019-07-18T13:58:53.374Z"
            },
            {
                "id": 15,
                "name": "Clap",
                "created_at": "2019-07-18T13:58:53.392Z",
                "updated_at": "2019-07-18T13:58:53.392Z"
            }
        ]
    }
    

    This endpoint returns list of reactions for an account

    GET Count of Page Reactions by metadata

    curl -X GET \
      https://www.metype.com/api/v1/accounts/<account_id>/pages/reactions/<reaction_id>/<page_metadata_key>/<page_metadata_value>/count \
      -H 'Content-Type: application/json'
    
    
    {
        "reactions_count": {
            "value": 5
        }
    }
    

    This endpoint returns the count of reactions for a given metadata key and value.

    For example, if page metadata is { sections: ["sports", "health"] } and count of reactions on pages that belong to sports section is required, page_metadata_key could be section and page_metadata_value could be sports

    Organization API Documentation

    Accounts

    Create an account under an organization

    curl -X POST \
      https://www.metype.com/api/v1/organizations/<organization_id>/accounts \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token": <authentication_token>,
        "account_name": <account_name>,
        "account_email": <account_email>,
        "website_url": <website_url>
    }'
    
    
    {
      "id": 10,
      "config": null,
      "itsman_url": null,
      "name": "foo_1",
      "domains": [
          "http://localhost:3000"
      ],
      "profane_words": [],
      "profanity_configuration": {},
      "comments_limit": 4,
      "logo": null,
      "configurations": [
          {
              "id": 3,
              "name": "enable_image_uploads",
              "display_name": "Images/GIFs in comments"
          }
      ],
      "comment_reaction_sets": [],
      "page_reaction_sets": {
          "id": 10,
          "account_id": 10,
          "reaction_set": [
              {
                  "id": 23,
                  "account_id": 10,
                  "reaction_id": 3,
                  "shortcode": ":smiley:",
                  "label": "Happy"
              },
              {
                  "id": 24,
                  "account_id": 10,
                  "reaction_id": 4,
                  "shortcode": ":cry:",
                  "label": "Sad"
              },
              {
                  "id": 25,
                  "account_id": 10,
                  "reaction_id": 5,
                  "shortcode": ":sunglasses:",
                  "label": "Cool"
              }
          ],
          "created_at": "2018-09-04T06:51:08.812Z",
          "updated_at": "2018-09-04T06:51:08.812Z"
      },
      "total_comments_count": 0,
      "is_paid_account": false
    }
    

    This endpoint creates an account under an organization

    HTTP Request

    POST https://www.metype.com/api/v1/organizations/:organization_id/accounts

    Body Parameters

    Parameter Required Description
    authentication_token Yes Authentication token generated by the metype team to access APIs
    account_name Yes Name of the account
    account_email Yes Email related to the account
    website_url Yes URL of the website where metype will be used

    Response codes

    Response code Description
    201 Account is created
    400 When required paramaters are not sent with API
    401 When you pass wrong organization credentials i.e., organization_id or authentication_token
    404 When organization_id is not passed or invalid organization_id is not passed
    422 When an invalid website_url is sent as a parameter

    Users

    Create a user under an organization

    curl -X POST \
      https://www.metype.com/api/v1/organizations/<organization_id>/users \
      -d '{
        "authentication_token" : <authentication_toke>,
        "user":{
            "name":<name>,
            "email":<email>
        }
    }'
    
    {
        "id": 11,
        "name": "name",
        "avatar": null,
        "guest": false,
        "bio": "",
        "slug": "name-3",
        "accounts": []
    }
    

    This endpoint creates a user under an organization

    HTTP Request

    POST https://www.metype.com/api/v1/organizations/:organization_id/users

    Body Parameters

    Parameter Required Description
    authentication_token Yes Authentication token generated by the metype team to access APIs
    name Yes Name of the user
    email Yes Email of the user

    Response codes

    Response code Description
    201 User is created
    400 When required paramaters are not sent with API
    401 When you pass wrong organization credentials i.e., organization_id or authentication_token
    404 When organization_id is not passed or invalid path
    422 When user paramater or name is empty

    Comments Creation

    Create a comment under an organization using account and user

    curl -X POST \
      https://www.metype.com/api/v1/organizations/<organization_id>/accounts/<account_id>/comments \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token" : <authentication_toke>,
        "page_id": <page_id>,
      "comment": {
        "comment": "text"
      },
        "user_id": <user_id>
      }'
    
    {
        "comment": {
            "id": 207,
            "comment_realm_id": 3,
            "page_id": 2,
            "body": {
                "comment": "text"
            },
            "created_at": "2018-09-06T12:24:07.005Z",
            "parent_comment_id": null,
            "author_id": 19,
            "hidden_by_id": null,
            "hidden_at": null,
            "deleted_by_id": null,
            "deleted_at": null,
            "reactions": {},
            "edited_at": null,
            "is_spam": false,
            "is_published": true,
            "page_url": "https://foobar.com/stairway-way-to-heaven",
            "hero_image_url": null,
            "headline": null,
            "hidden": false,
            "deleted": false,
            "realm_comment_count": 1,
            "author": {
                "id": 19,
                "name": "name",
                "avatar": null,
                "guest": false,
                "bio": "",
                "slug": "name-4"
            }
        }
    }
    
    

    This endpoint creates a comment under an organization and account

    HTTP Request

    POST https://www.metype.com/api/v1/organizations/:organization_id/accounts/:account_id/comments

    Body Parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs
    page_id Yes Url of page which owns the comment Base64 encoded
    comment Yes JSON structure to store comment
    user_id Yes The author id of the comment
    parent_comment_id No If the comment is reply. Give parent comment id.

    Response codes

    Response code Description
    201 Comment is created.
    400 When required paramaters are not sent with API or invalid parameters are sent with API.
    401 When you pass wrong organization credentials i.e., organization_id or authentication_token
    404 When organization_id or account_id is not passed or invalid path.
    422 When invalid page_id or user_id or parent_comment_id is passed.

    Admin

    List all account comments for an account

    curl -X GET \
      'https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments?authentication_token=SDtWvarjZwxyQd3JzMQQ&user_id=52'
    
    list comment response:
    
    {
        "comments": [
            {
                "id": 44,
                "comment_realm_id": 11,
                "page_id": 1,
                "body": {
                    "ops": [
                        {
                            "insert": "foobar"
                        }
                    ]
                },
                "created_at": "2018-09-12T06:40:35.189Z",
                "parent_comment_id": null,
                "author_id": 52,
                "hidden_by_id": null,
                "hidden_at": null,
                "deleted_by_id": null,
                "deleted_at": null,
                "reactions": {},
                "edited_at": null,
                "is_spam": false,
                "is_published": true,
                "page_url": "https://example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": false,
                "realm_comment_count": 1,
                "author": {
                    "id": 52,
                    "name": "Foobar",
                    "avatar": "https://www.example.com/avatar.jpg",
                    "guest": false,
                    "bio": "",
                    "slug": "foobar"
                }
            }
        ],
        "total_entries": 1,
        "total_pages": 1
    }
    

    GET https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments

    Query parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    page No Page number. Default: 1 Integer
    per_page No Number of comments to load per page. Default: 10 Integer
    status No Get comments based on status. Accepted values: "approved", "hidden_or_deleted", "pending" String
    spam No Get only spam comments Boolean
    sort_order No sort comments response by ascending or descending order. Accepted values: "asc", "desc". Default: "desc" String

    Search Comments

        curl -X GET \
      'https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments?authentication_token=SDtWvarjZwxyQd3JzMQQ&user_id=52&mquery=foobar'
    
    search comment response:
    
        {
        "comments": [
            {
                "id": 44,
                "comment_realm_id": 11,
                "page_id": 1,
                "body": {
                    "ops": [
                        {
                            "insert": "foobar"
                        }
                    ]
                },
                "created_at": "2018-09-12T06:40:35.189Z",
                "parent_comment_id": null,
                "author_id": 52,
                "hidden_by_id": null,
                "hidden_at": null,
                "deleted_by_id": null,
                "deleted_at": null,
                "reactions": {},
                "edited_at": null,
                "is_spam": false,
                "is_published": true,
                "page_url": "https://www.example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": false,
                "realm_comment_count": 1,
                "author": {
                    "id": 123,
                    "name": "fooauthor",
                    "avatar": "https://www.example.com/photo.jpg",
                    "guest": false,
                    "bio": "",
                    "slug": "fooauthor"
                }
            }
        ],
        "total_entries": 3,
        "total_pages": 1
    }
    

    GET https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments

    Query parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    mquery Yes search term to get matching comments String

    View Comment Detail

        curl -X GET \
        'http://localhost:3000/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments/44?authentication_token=SDtWvarjZwxyQd3JzMQQ&user_id=52'
    
    comment-detail response:
        {
        "comment": {
            "id": 44,
            "comment_realm_id": 11,
            "page_id": 1,
            "body": {
                "ops": [
                    {
                        "insert": "foobar"
                    }
                ]
            },
            "created_at": "2018-09-12T06:40:35.189Z",
            "parent_comment_id": null,
            "author_id": 123,
            "hidden_by_id": null,
            "hidden_at": null,
            "deleted_by_id": null,
            "deleted_at": null,
            "reactions": {},
            "edited_at": null,
            "is_spam": false,
            "is_published": true,
            "page_url": "http://example.com/page_url",
            "hero_image_url": null,
            "headline": null,
            "hidden": false,
            "deleted": false,
            "realm_comment_count": 1,
            "author": {
                "id": 123,
                "name": "FooAuthor",
                "avatar": "https://www.example.com/photo.jpg",
                "guest": false,
                "bio": "",
                "slug": "fooAuthor"
            }
        },
        "timeline": [
            {
                "event": "submitted_at",
                "event_time": "2018-09-12T06:40:35.193Z",
                "event_by": "FooAuthor"
            }
        ]
    }
    
    

    GET https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments/<comment_id>

    Query parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer

    Approve Comment(s)

    curl -X POST \
      https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments/approve \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token" : "SDtWvarjZwxyQd3JzMQQ",
        "user_id": 52,
        "comment_ids": [44]
      }
    '
    
    
    Approve comment response:
    
        {
        "comment": [
            {
                "is_spam": false,
                "is_published": true,
                "body": {
                    "ops": [
                        {
                            "insert": "foobar"
                        }
                    ]
                },
                "parent_comment_id": null,
                "id": 44,
                "comment_realm_id": 11,
                "page_id": 1,
                "created_at": "2018-09-12T06:40:35.189Z",
                "author_id": 123,
                "hidden_by_id": null,
                "hidden_at": null,
                "deleted_by_id": null,
                "deleted_at": null,
                "reactions": {},
                "edited_at": null,
                "page_url": "http://www.example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": false,
                "realm_comment_count": 1,
                "author": {
                    "id": 123,
                    "name": "fooAuthor",
                    "avatar": "http://www.example.com/photo.jpg",
                    "guest": false,
                    "bio": "",
                    "slug": "fooAuthor"
                }
            }
        ]
    }
    

    POST https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments/approve

    Body parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    comment_ids Yes Comment id(s) whose state needs to be changed from pending to published Array

    Restore Comment(s)

    curl -X POST \
      https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments/restore \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token" : "SDtWvarjZwxyQd3JzMQQ",
        "user_id": 52,
        "comment_ids": [37]
      }
    '
    
    Restore comment response:
        {
        "comment": [
            {
                "author_id": 123,
                "hidden_at": null,
                "deleted_at": null,
                "deleted_by_id": null,
                "is_published": true,
                "id": 37,
                "body": {
                    "comment": "testing"
                },
                "comment_realm_id": 1,
                "page_id": 1,
                "created_at": "2018-09-11T10:36:34.757Z",
                "parent_comment_id": null,
                "hidden_by_id": null,
                "reactions": {},
                "edited_at": null,
                "is_spam": false,
                "page_url": "http://www.example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": false,
                "realm_comment_count": 10,
                "author": {
                    "id": 123,
                    "name": "FooAuthor",
                    "avatar": "http://www.example.com/photo.jpg",
                    "guest": false,
                    "bio": "",
                    "slug": "fooAuthor"
                }
            }
        ]
    }
    

    POST https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments/restore

    Body parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    comment_ids Yes Comment id(s) whose state needs to be changed from deleted to published Array

    Delete Comment(s)

    curl -X DELETE \
      https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token" : "SDtWvarjZwxyQd3JzMQQ",
        "user_id": 52,
        "comment_ids": [44]
      }
    '
    
    
    delete comment response:
    
        {
        "comment": [
            {
                "deleted_at": "2018-09-12T07:22:53.810Z",
                "id": 44,
                "comment_realm_id": 11,
                "page_id": 1,
                "created_at": "2018-09-12T06:40:35.189Z",
                "parent_comment_id": null,
                "hidden_by_id": null,
                "hidden_at": null,
                "reactions": {},
                "is_spam": false,
                "is_published": true,
                "page_url": "https://example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": true,
                "realm_comment_count": 1
            }
        ]
    }
    

    DELETE https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id/comments

    Body parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    comment_ids Yes Comment id(s) whose state needs to be changed from pending/approved to deleted Array

    Spam Comments(s)

    curl -X POST \
      https://www.metype.com/api/v1/organizations/724ef842-799d-4acc-9dd6-ce038f13eb4b/admin/accounts/2/comments/spam \
      -H 'Content-Type: application/json' \
      -d '{
        "authentication_token" : "SDtWvarjZwxyQd3JzMQQ",
        "user_id": 52,
        "comment_ids": [44]
      }
    '
    
    
    spam response:
    
    {
        "comment": [
            {
                "id": 44,
                "is_spam": true,
                "comment_realm_id": 11,
                "page_id": 1,
                "created_at": "2018-09-12T06:40:35.189Z",
                "parent_comment_id": null,
                "hidden_by_id": null,
                "hidden_at": null,
                "deleted_at": "2018-09-12T07:22:53.810Z",
                "reactions": {},
                "is_published": true,
                "page_url": "http://example.com/page_url",
                "hero_image_url": null,
                "headline": null,
                "hidden": false,
                "deleted": true,
                "realm_comment_count": 1
            }
        ]
    }
    

    POST https://www.metype.com/api/v1/organizations/<organization_id>/admin/accounts/<account_id>/comments/spam

    Body parameters

    Parameter Required Description Type
    authentication_token Yes Authentication token generated by the metype team to access APIs String
    user_id Yes Account Owner user_id Integer
    comment_ids Yes Comment id(s) whose state needs to be changed from pending/approved/trash to spam Array

    Release Notes

    17 Jul 2019 Release Note - Metype

    1. Re-moderate edited comments - Comments approved by the admin, when edited by the commenter are now required to be re-aproved when pre-moderation is turned on.
    2. [Bug fix] - Console log has CORS error.

    20 Jun 2019 Release Note - Metype

    1. Claps - Introducing the Claps widget. Available as an embed code, this widget lets your audience appreciate your content by applauding.

    Claps Claps Embed code Claps Config Headline

    1. [Bug fix] - Unable to save Settings in config page.

    14 Jun 2019 Release Note - Metype

    1. Caching optimisations in Page Reactions widget.

    10 Jun 2019 Release Note - Metype

    1. Third Party Login enhancements
    2. Removed page_url parameter from Live Feed iframe.
    3. [Bug fix] - Login using Twitter and LinkedIn fails in LiveFeed widget.

    31 May 2019 Release Note - Metype

    1. Metype is now available for $7.99 per month.
    2. Android and iOS applications can now leverage the Third Party Login feature for commenting.
    3. [Bug fix] - Facebook login redirect issue in iOS/Mac-Safari.

    20 May 2019 Release Note - Metype

    1. Configurable Page Reaction Headline - Now customize your own message to be displayed above the Page Reactions widget. Config - Configuarable Page Reaction Headline

    22 Apr 2019 Release Note - Metype

    1. Third party login with Metype: Publishers and bloggers can use their own user login system to allow their audience to login and comment.

    The developer documentation to implement this is available here.

    Config - Third Party Login

    22 Oct 2018 Release Notes - Metype

    1. Toggle to control display of Top Stories on Commenting Widget.

    Config - Top Pages

    18 Oct 2018 Release Notes - Metype

    1. Top Pages on Commenting and Feed widget: This section is visible on the Commenting and Feed widgets. Top pages are the ones that have the most engagement with audiences. The set of top pages is refreshed every 4 hours. Also, newly published pages always stand a greater chance of being picked up as a top page. Comment Top Pages Feed Top Pages

    2. Perspective API for toxicity: Moderate hate speech and inappropriate comments using the toxicity score. Filter by Toxicity and moderate in bulk with ease. Check out our blog for more here.

    3. Performance Optimisations: Metype widgets are now optimised to load much quicker on your pages.

    22 Aug 2018 Release Notes - Metype

    1. Enhanced Single Sign-On(SSO) - Metype's SSO has been enhanced so users can sign-in with any email address and password. The feature includes all login related workflows such as Sign-up, Sign-in and Forgot Password along with verification of email with an OTP. The SSO login page also displays displays the website's branding.

    Click here to know how to integrate SSO on your website.

    Metype SSO Form Login Metype SSO Form Sign Up Metype SSO Form OTP Metype SSO Form Authenticate User

    1. [Bug fix] Ad-units not responsive.
    2. [Bug fix] Twitter and LinkedIn Login redirect issues in SSO.

    13 Aug 2018 Release Notes - Metype

    1. [Bug fix] Commenting widget was partially loaded on pages part of a set of infinite scroll stories.

    3 Aug 2018 Release Notes - Metype

    1. Sign-in to Metype using your LinkedIn account. This is available on Metype home page, Comment widget sign-in, Feed widget sign-in and also available to publishers using Metype login to manage their user identities. Metype LinkedIn Sign In Metype LinkedIn Sign In Home Metype LinkedIn Sign In Feed

    Metype LinkedIn Sign In Comment

    27 Jul 2018 Release Notes - Metype

    1. The Live Feed is now enhanced to allow users to login and view their notificaions.

    Feed Notifications Logged In Feed Notifications Logged Out

    26 Jul 2018 Release Notes - Metype

    <div id='metype-container' class='iframe-container' data-metype-account-id='2' data-metype-host='https://www.metype.com/' data-metype-primary-color='#0000ff' data-metype-bg-color='#ffffff' data-metype-font-color='#4a4a4a'> data-metype-comment-widget-id="comment-widget-2"</div>
    <script type='text/javascript'>
      var metypeContainer = document.getElementById("metype-container"),
        page_url = metypeContainer.getAttribute("data-metype-page-url");
      metypeContainer.setAttribute('data-metype-page-url', page_url || window.location.href);
      metypeContainer.setAttribute('data-metype-window-height', window.innerHeight);
      metypeContainer.setAttribute('data-metype-screen-width', window.screen.width);
      talktype(function() {
        talktype.commentWidgetIframe(metypeContainer);
      });
    </script>
    
    1. Publishers can now embed many conversations on a single page.

    Note to developers: The commenting widget allows an additional field data-metype-comment-widget-id in the <div> tag of the commenting widget, and can have any arbitrary value. E.g., data-metype-comment-widget-id="comment-widget-2".

    4 Jul 2018 Release Notes - Metype

    1. Notifications for reactions to comments - commenters will now get notified when other users react on their comments. Comment Reactions Notify
    2. Story Reactions - Publishers can now use Story Reactions to emote and engage with their audience without having to type in anything. Story Reactions Write to us at metype@quintype.com to get your own set of story reactions configured for your account.
    3. Bug fixes and loading speed optimisations on the widgets.