Get message count

Returns the number of messages sent after the given timetoken. You can specify up to 100 channels in a single call.

  • Channels without messages have a count of 0.
  • Channels with 10,000 messages or more have a count of 10000.
Path Parameters
sub_key string — REQUIRED

Your app's subscribe key from Admin Portal.

Example: sub-c-50264475-1902-558x-d213-7p19052012n2

channels string — REQUIRED

The channel names to perform the operation on.

Example: ch1,ch2

Query Parameters
timetoken number — REQUIRED

A single timetoken to cover all channels passed-in on the request path. Value must be greater than or equal to 0 (zero).

Note: Required timetoken information To make a successful API call, you must provide either timetoken or channelsTimetoken, but you cannot use both.

channelsTimetoken string

A comma-delimited list of timetokens, in order of the channels list, in the request path. If the list of timetokens is not the same length as the list of channels, a 400 bad request error will result. Value must be greater than or equal to 0 (zero).

Note: Required timetoken information To make a successful API call, you must provide either timetoken or channelsTimetoken, but you cannot use both.

Example: 15210190573608384,15211140747622125

auth string

String which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.

Example: authKey / p0thisAkFl043rhDdHRsCkNyZXisRBjoERtZXRhoENzaWdYIGOAeTyWGJI

uuid string

A UTF-8 encoded string of up to 92 characters used to identify the client.

Example: myUniqueUserId

signature string

Signature used to verify that the request was signed with the secret key associated with the subscriber key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

See Access Manager documentation for details on how to compute the signature.

timestamp integer

Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 second offset from NTP.

Required if signature parameter is supplied.

Responses
200

OK

Schema — OPTIONAL
status integer — OPTIONAL
error boolean — OPTIONAL
channels object — OPTIONAL
more (circular) — OPTIONAL
400

The request was invalid.

Schema — OPTIONAL
status integer — OPTIONAL
error boolean — OPTIONAL
error_message string — OPTIONAL
channels object — OPTIONAL
403

Do not have permission

Schema — OPTIONAL
status integer — OPTIONAL
error boolean — OPTIONAL
error_message string — OPTIONAL
* required
sub_key*
Type: string
Your app's subscribe key from Admin Portal.
channels*
Type: string
The channel names to perform the operation on.
* required
timetoken*
Type: number
A single timetoken to cover all channels passed-in on the request path. Value must be greater than or equal to 0 (zero).

Note: Required timetoken information
To make a successful API call, you must provide either timetoken or channelsTimetoken, but you cannot use both.
channelsTimetoken
Type: string
A comma-delimited list of timetokens, in order of the channels list, in the request path. If the list of timetokens is not the same length as the list of channels, a 400 bad request error will result. Value must be greater than or equal to 0 (zero).

Note: Required timetoken information
To make a successful API call, you must provide either timetoken or channelsTimetoken, but you cannot use both.
auth
Type: string
String which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.
uuid
Type: string
A UTF-8 encoded string of up to 92 characters used to identify the client.
signature
Type: string
Signature used to verify that the request was signed with the secret key associated with the subscriber key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

See Access Manager documentation for details on how to compute the signature.
timestamp
Type: integer
Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 second offset from NTP.

Required if signature parameter is supplied.
status
Type: integer
Example: 200
error
Type: boolean
Example: false
channels
Type: object
more
Type: any
Example Response
{
  "status": 200,
  "error": false,
  "error_message": "",
  "channels": {
    "myChannel1": 33,
    "myChannel2": 0
  },
  "more": {
    "myChannel1": {
      "url": "",
      "is_more": false
    },
    "myChannel2": {
      "url": "",
      "is_more": false
    }
  }
}
status
Type: integer
Example: 400
error
Type: boolean
Example: true
error_message
Type: string
Example: "Invalid Arguments: start"
channels
Type: object
Example: {}
status
Type: integer
Example: 403
error
Type: boolean
Example: true
error_message
Type: string
Example: "Do not have permission to delete"