Publish message to channel
Publish JSON to a channel using the GET request.
| Path Parameters |
|---|
pub_key string — REQUIREDYou app’s publish key from Admin Portal. Example:
|
sub_key string — REQUIREDYour app's subscribe key from Admin Portal. Example:
|
channel string — REQUIREDThe channel ID to perform the operation on. Example:
|
callback string — REQUIREDThe JSONP callback name to wrap the function in. Use Example (myCallback):
Example (zero):
|
payload string — REQUIREDURL-encoded JSON. Payload size cannot be more than 32KiB. Example:
|
| Query Parameters |
|---|
store integerThis parameter overrides the default account configuration on message saving. |
auth stringString 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:
|
meta stringJSON with additional information. Contains additional information about the message, which can be used for stream filtering. Value must be a JSON stringified and URI encoded string. Example (meta sample):
|
uuid stringA UTF-8 encoded string of up to 92 characters used to identify the client. Example:
|
ttl numberSet a per-message time-to-live in Message Persistence. This parameter accepts both integer and floating-point numbers. For Integer values:
For Float values:
Example:
|
signature stringSignature used to verify that the request was signed with the secret key associated with the subscribe key. If Access Manager is enabled, either a valid authorization token or a signature are required. Check Access Manager documentation for details on how to compute the signature. |
timestamp integerUnix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP. Required if the |
custom_message_type stringPossible values: 3 ≤ length ≤ 50 User-specified message type string - limited by 3-50 case-sensitive alphanumeric characters with only [a-zA-Z0-9-_*] |
| Responses | ||||
|---|---|---|---|---|
200OK
| ||||
400Bad Request
| ||||
403Forbidden
| ||||
413Message payload is too large (>=32KiB)
| ||||
429Request rate limit exceeded
|
pub_key*sub_key*channel*callback*0 for no callback.payload*store1 to save, 0 not to save.authmetaContains additional information about the message, which can be used for stream filtering. Value must be a JSON stringified and URI encoded string.
uuidttlThis parameter accepts both integer and floating-point numbers.
For Integer values:
* If store =
1, and ttl = 0, the message is stored with your subscribe key’s configured TTL.* If store =
1, and ttl = X (X is an Integer value), the message is stored with an expiry time of X hours unless you have message retention set to Unlimited on your keyset configuration in the Admin Portal.* If store =
0, the ttl parameter is ignored.* If
ttl is not specified, expiration of the message defaults back to the expiry value of the subscribe key.For Float values:
* If store =
1, and ttl <= 0, the message is stored with your subscribe key's configured TTL.* If store =
1, and ttl >= your subscribe key's configured TTL, the message is stored with your subscribe key's configured TTL.* If store =
1, and ttl = X (X is a Float value), the message is stored with an expiry time of X hours (e.g., 0.5 = 30 minutes) unless you have message retention set to Unlimited on your keyset configuration in the Admin Portal.* If store =
0, the ttl parameter is ignored.* If
ttl is not specified, expiration of the message defaults back to the expiry value of the subscribe key.signatureIf Access Manager is enabled, either a valid authorization token or a signature are required.
Check Access Manager documentation for details on how to compute the signature.
timestampRequired if the
signature parameter is supplied.custom_message_type- and _ special characters allowed. [a-zA-Z0-9-_*]
[
1,
"Sent",
"14375220012064619"
][
0,
"Wildcard maximum depth exceeded",
"16866840224081436"
][
0,
"Forbidden"
][
0,
"Request Entity Too Large"
]