Send signal to channel
This resource allows a developer to send a signal to a channel.
Returns a three-element array:
- Array element 0 - (Integer)
1
or0
, where1
is a success, and0
is an error. - Array element 1 - (String) Description of the success or error, if available.
- Array element 2 - (String) The current PubNub time expressed as a timetoken.
Path Parameters |
---|
pub_key string — REQUIREDYou app’s publish key from Admin Portal. Example: pub-c-50264475-1902-558x-b37b-56d7fb64bf45 |
sub_key string — REQUIREDYour app's subscribe key from Admin Portal. Example: sub-c-50264475-1902-558x-d213-7p19052012n2 |
channel string — REQUIREDThe channel name to perform the operation on. Example: myChannel |
callback string — REQUIREDThe JSONP callback name to wrap the function in. Use Example (myCallback): myCallback Example (zero): 0 |
payload string — REQUIREDSignals are limited to a message payload size of 30 bytes. This limit applies only to the request body, not to the URI or headers. |
Query Parameters |
---|
uuid stringA UTF-8 encoded string of up to 64 characters used to identify the client. Example: myUniqueUserId |
auth stringString which is either the auth key (PAM v2) or a valid token (Access Manager) used to authorize the operation if access control is enabled. Example: myAuthKey |
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 |
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-_*] |
space-id stringPossible values: 3 ≤ length ≤ 50 User-specified space ID string - limited by 3-50 case-sensitive alphanumeric characters with only [a-zA-Z0-9-_*] |
Responses | |||||||
---|---|---|---|---|---|---|---|
200 Publish successful
| |||||||
400 Bad Request
| |||||||
403 Unauthorized access
| |||||||
413 Signal payload size is too large (>=32K)
| |||||||
429 Request rate limit exceeded
|