MENU
      Usage examples

        Usage examples


        Article summary

        Usage examples

        How to view total online counts

        Request

        • Method : POST
        • URI : https://dashboard-api.ncloudchat.naverncp.com/v1/api/subscriptions
        GET
        url : https://dashboard-api.ncloudchat.naverncp.com/v1/api/subscriptions?filter=%7B%22online%22%3Atrue%7D&sort=%7B%22created_at%22%3A%22-1%22%7D&option=%7B%22count%22%3Atrue%7D
        Header : 'content-type: application/json'
        Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx'
        Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx'
        JavaScript
        HeaderTypeRequiredDescription
        X-API-KEYStringOAuthentication key issued by GAMEPOT
        X-PROJECT-IDStringODashboard project ID
        ParameterTypeRequiredDescription
        filterStringO{"online":true} View users who are currently online
        sortStringXDefine the filter for the fields you want to sort
        optionStringX{"count":true} Get only the total number

        Response

        Success

        {
          "data": {
            "subscriptions": {
              "totalCount": 5227,
              "edges": null
            }
          }
        }
        JavaScript
        AttributeTypeDescription
        totalCountNumberProject ID

        Failure

        {
            "status": -1,
            "message": "Error message"
        }
        JavaScript
        AttributeTypeDescription
        codeIntResult \ (1: success, refer to the error code in case of failure )
        errorStringError message

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.