SendMessage
public BackendReturnObject SendMessage(string gamerIndate, string contents);
Parameters
Value | Type | Description |
---|---|---|
gamerIndate | String | indate of the gamer to receive the message |
contents | string | Message content |
Description
Sends a message to the user of the corresponding gamerIndate.
There is a limit to the character length of the message content(set in the Console).
There is a limit to the number of sent and received messages kept in the list(set in BACKND Console > Social Management > Settings > Messages).
The message function does not work without a gamer nickname.
Example
Synchronous
Backend.Message.SendMessage("2020-02-11T01:08:12.603Z", "Have a good day today");
Asynchronous
Backend.Message.SendMessage("2020-02-11T01:08:12.603Z", "Have a good day today", (callback) => {
// Post-process
});
SendQueue
SendQueue.Enqueue(Backend.Message.SendMessage, "2020-02-11T01:08:12.603Z",
"Have a good day today", (callback) => {
// Post-process
});
Return cases
Success cases
When sent successfully
statusCode : 204
Error cases
When the sender and recipient are the same
statusCode : 400
errorCode : BadParameterException
When the sender does not have a nickname
statusCode : 401
errorCode : BadUnauthorizedException
When the maximum number of owned messages is 0
statusCode : 403
errorCode : ForbiddenException
When the recipient's messages are full
statusCode : 405
errorCode : MethodNotAllowedParameterException
When the number of characters in the content is greater than the number set in the console
statusCode : 412
errorCode : PreconditionFailed