To send an on-line notice to a user, use the command user/update_user_notification:
svc=user/update_user_notification¶ms={"itemId":<long>, "id":<long>, "callMode":<text>, "h":<text>, "d":<text>, "s":<text>, "ttl":<uint>}
You can find an example of this request in the sample Executing several commands at once.
Name | Description | |
---|---|---|
itemId | user ID | |
id | notice ID (required for deleting) | |
callMode | action: create, delete | |
Optional parameters (required for create and update) | ||
h | subject | |
d | message text | |
s | sender | |
ttl | lifetime, when expires the notice will be deleted (UTC) |
On create:
[ <long>, /* notice ID */ { "t":<uint>, /* lifetime (UTC) */ "d":<text>, /* message text */ "h":<text>, /* subject */ "s":<text> /* sender */ } ]
On delete:
[ <long>, /* notice ID */ null ]
Code | Value |
---|---|
1 | invalid session |
2 | invalid service name |
3 | invalid result |
4 | invalid format or value of parameters |
6 | notification not found |
7 | access denied |
|