Lobby using WebSockets
Overview
The AccelByte WebSocket Messaging protocol is a simple messaging protocol focusing on fast object-message conversion on the server side and simplicity on the client side. This protocol is a subset of the YAML data serialization language.
Basic structure
The structure supported by this protocol is string key-value object. The keys and the values are separated by a colon followed by a white space. Objects are separated by newlines.
keyA: [valueA1 | valueA2 | valueAn | ]\n |
---|---|---|---|
keyB: [valueB1 | valueB2 | valueBn | ] |
Each message must come with a type object defining the message type.
type: | messageType\n |
---|---|
keyA: | valueA\n |
keyB: | [valueB1,valueB2,valueBn,] |
Date-time-based values must be represented by date time ISO-8601 up to the second field.
type: | messageType\n |
---|---|
keyA: | valueA\n |
keyB: | [valueB1,valueB2,valueBn,]\n |
time: | 2018-11-09T03:51:18Z |
Message types
There are three types of messages in the Lobby server implementation.
Request
Request message is a message from client to server. The request message type should have a "-Request" suffix. A request message must have an object ID generated by the client and object ID must be placed after the object type. Each request must be responded to by the server with the same object ID. The Object type must be at the top of any object.
type: | fooRequest\n |
---|---|
id: | 878a0f51bedd4825cf46827fd1478224\n |
keyA: | valueA\n |
keyB: | [valueB1,valueB2,valueBn,] |
Response
Response message is message from server to client corresponding to a client's request. A response message type should have a "-Response" suffix and the response object ID must correspond with the request. Response must have object code identifying response code. Successful requests must be responded to with status 0. Unsuccessful requests must be responded to with a non-0 status code—preferably an error event ID. When the code is non-0, the other field should be ignored.
type: | fooResponse\n |
---|---|
id: | 878a0f51bedd4825cf46827fd1478224\n |
code: | 0\n |
keyA: | valueA\n |
keyB: | [valueB1,valueB2,valueBn,] |
Notification
A notification is a message sent from the server to a client without a user request. The notification message type should have a "-Notif" suffix.
type: | fooNotif\n |
---|---|
keyA: | valueA\n |
keyB: | [valueB1,valueB2,valueBn,] |
Lobby Server Usage
Party
Command | Request Payload | Response Payload | Unreal | Unity | OSS |
---|---|---|---|---|---|
Get current party info | type: partyInfoRequest\n id: message123 | type: partyInfoResponse\n id: message123\n code: 0\n partyID: party123\n leaderID: user123\n members: [user123,user456,]\n invitees: user789\n invitationToken: invtoken123 | Lobby::SendInfoPartyRequest() | GetPartyInfo(ResultCallback<PartyInfo> callback) | *cannot be called externally, Party info will be called automatically in Create, Join or Restore party. |
Create new party | type: partyCreateRequest\n id: message123 | type: partyCreateResponse\n id: message123\n code: 0\n partyID: party123\n leaderID: user123\n members: user123\n invitees:\n invitationToken: invtoken123 | Lobby::SendCreatePartyRequest() | CreateParty(ResultCallback<PartyCreateResponse> callback) | FOnlinePartySystemAccelByte::CreateParty(const FUniqueNetId& LocalUserId, const FOnlinePartyTypeId PartyTypeId, const FPartyConfiguration& PartyConfig, const FOnCreatePartyComplete& Delegate) |
Leave current party | type: partyLeaveRequest\n id: message123 | type: partyLeaveResponse\n id: message123\n code: 0 | Lobby::SendLeavePartyRequest() | LeaveParty(ResultCallback callback) | FOnlinePartySystemAccelByte::LeaveParty(const FUniqueNetId& LocalUserId, const FOnlinePartyId& PartyId, const FOnLeavePartyComplete& Delegate) |
Party leave notice | type: partyLeaveNotif\n userID: user345\n leaderID: user123 | SetPartyMemberLeaveNotifDelegate(const FPartyMemberLeaveNotif& OnPartyMemberLeaveNotice) | LeaveFromParty | N/A | |
Invite user to party | type: partyInviteRequest\n id: message123 friendID: user456 | type: partyInviteResponse\n id: message123\n code: 0 | Lobby::SendInviteToPartyRequest(const FString& UserId) | InviteToPartyDetailedCallback(string userId, ResultCallback<PartyInviteResponse> callback) | FOnlinePartySystemAccelByte::SendInvitation(const FUniqueNetId& LocalUserId, const FOnlinePartyId& PartyId, const FPartyInvitationRecipient& Recipient, const FOnSendPartyInvitationComplete& Delegate /= FOnSendPartyInvitationComplete()/) |
Invitation notice | type: partyInviteNotif\n inviterID: user123\n inviteeID: user456 | SetPartyInviteNotifDelegate(const FPartyInviteNotif& OnPartyInviteNotif) | N/A | OnPartyInvitesChanged | |
Being invited | type: partyGetInvitedNotif\n from: user123\n partyID: party123\n invitationToken: invtoken123 | SetPartyGetInvitedNotifDelegate(const FPartyGetInvitedNotif& OnInvitePartyGetInvitedNotice) | InvitedToParty | OnPartyInviteReceivedEx | |
Accept Invitation | type: partyJoinRequest\n id: message123\n partyID: party123\n invitationToken: invtoken123 | type: partyJoinResponse\n id: message123\n code: 0\n partyID: party123\n leaderID: user123\n members: [user123,user456,]\n invitees:\n invitationToken: invtoken123 | Lobby::SendAcceptInvitationRequest(const FString& PartyId , const FString& InvitationToken) | public void JoinParty(string partyID,string invitationToken, ResultCallback<PartyInfo> callback) | FOnlinePartySystemAccelByte::JoinParty(const FUniqueNetId& LocalUserId, const IOnlinePartyJoinInfo& OnlinePartyJoinInfo, const FOnJoinPartyComplete& Delegate) |
Invitation being accepted | type: partyJoinNotif\n userID: user456 | SetPartyJoinNotifDelegate(const FPartyJoinNotif& OnInvitePartyJoinNotice) | JoinedParty | N/A * will automatically add new player to local party map | |
Reject Invitation | type: partyRejectRequest\n id: message123\n partyID: party123\n invitationToken: invtoken123 | Type: partyRejectResponse\n id: message123\n code: 0 | SendRejectInvitationRequest(const FString& PartyId, const FString& InvitationToken) | RejectPartyInvitation(string partyId,string invitationToken, ResultCallback<PartyRejectResponse> callback) | FOnlinePartySystemAccelByte::RejectInvitation(const FUniqueNetId& LocalUserId, const FUniqueNetId& SenderId) |
Invitation Being Rejected | Type: partyRejectNotif\n id: message123\n code: 0\n partyID: party123\n rejectedID: user123\n members: [user123,user456,] | SetPartyInvitationRejectedNotifDelegate(const FPartyRejectNotif& OnInvitePartyRejectNotice) | RejectedPartyInvitation | N/A | |
Kick member | type: partyKickRequest\n id: message123\n memberID: user456 | type: partyKickResponse\n id: message123\n code: 0 | Lobby::SendKickPartyMemberRequest(const FString& UserId) | KickPartyMemberDetailedCallback(string userId, ResultCallback<KickResponse> callback) | FOnlinePartySystemAccelByte::KickMember(const FUniqueNetId& LocalUserId, const FOnlinePartyId& PartyId, const FUniqueNetId& TargetMemberId, const FOnKickPartyMemberComplete& Delegate) |
Being kicked | type: partyKickNotif\n leaderID: user123\n userID: user456\n partyID: party123 | SetPartyKickNotifDelegate(const FPartyKickNotif& OnInvitePartyKickedNotice) | KickedFromParty | OnPartyExited | |
Generate party code | type: partyGenerateCodeRequest\n id: message123\n | type: partyGenerateCodeResponse\n id: message123\n partyCode: partycode123 code: 0 | Lobby::SendPartyGenerateCodeRequest() | GeneratePartyCode(ResultCallback<PartyGenerateCodeResponse> callback) | N/A |
Get party code | type: partyGetCodeRequest\n id: message123\n | type: partyGetCodeResponse\n id: message123\n partyCode: partycode123 code: 0 | Lobby::SendPartyGetCodeRequest() | GetPartyCode(ResultCallback<PartyGetCodeResponse> callback) | * Cannot be called externally, will be called internally on Create, Restore or promoted to leader To get local cached party code use bool FOnlinePartySystemAccelByte::GetPartyCode(FString& Output, const FUniqueNetId& LocalUserId, const FOnlinePartyId& PartyId) |
Delete party code | type: partyDeleteCodeRequest\n id: message123\n | type: partyDeleteCodeResponse\n id: message123\n code: 0 | Lobby::SendPartyDeleteCodeRequest() | DeletePartyCode(ResultCallback callback) | N/A |
Join party via code | type: partyJoinViaCodeRequest\n id: message123\n partyCode: partyCode123\n | type: partyJoinViaCodeResponse\n id: message123\n code: 0\n partyID: party123\n leaderID: user123\n members: [user123,user456,]\n invitees:[user123,user456,]\n invitationToken: invtoken123 | Lobby::SendPartyJoinViaCodeRequest(const FString& partyCode) | JoinPartyViaCode(string invitationPartyCode, ResultCallback<PartyInfo> callback) | bool FOnlinePartySystemAccelByte::JoinParty(const FUniqueNetId& LocalUserId, const FString& InPartyCode, const FOnJoinPartyComplete& Delegate) |
Promote leader | type: partyPromoteLeaderRequest\n id: message123\n newLeaderUserId: user123\n | type: partyPromoteLeaderResponse\n id: message123\n code: 0\n partyID: party123\n leaderID: user123\n members: [user123,user456,]\n invitees:[user123,user456,]\n invitationToken: invtoken123 | Lobby::SendPartyPromoteLeaderRequest(const FString& UserId) | PromotePartyLeader(string userId, ResultCallback<PartyPromoteLeaderResponse> callback) | Promote game session leader bool FOnlineSessionV2AccelByte::PromoteGameSessionLeader(const FUniqueNetId& LocalUserId, const FName& SessionName,const FUniqueNetId& PlayerIdToPromote) === Promote party session leader bool FOnlineSessionV2AccelByte::PromotePartySessionLeader(const FUniqueNetId& LocalUserId, const FName& SessionName, const FUniqueNetId& PlayerIdToPromote, const FOnPromotePartySessionLeaderComplete& Delegate) |
Party data update notice | type: partyDataUpdateNotif\n partyID: party123\n leader: user123\n members: [user123,user456,]\n invitees:[user123,user456,]\n custom_attribute:{ }\n updatedAt: 123123 | SetPartyDataUpdateNotifDelegate(FPartyDataUpdateNotif OnPartyDataUpdateNotif) | PartyDataUpdateNotif | N/A | |
Party member connect notice | SetPartyMemberConnectNotifDelegate(FPartyMemberConnectNotif OnPartyMemberConnectNotif) | N/A | OnMemberConnectionStatusChanged | ||
Party member disconnect notice | SetPartyMemberDisconnectNotifDelegate(FPartyMemberDisconnectNotif OnPartyMemberDisconnectNotif) | N/A | OnMemberConnectionStatusChanged | ||
Send party notification | Lobby::SendNotificationToPartyMember(const FString& Topic , const FString& Payload) | SendNotificationToPartyMember(string topic, string payload, ResultCallback<PartySendNotifResponse> callback ) | N/A | ||
Get Party notice | SetPartyNotifDelegate(FPartyNotif OnPartyNotif) | PartyNotif | N/A |
Chat V1
Command | Request Payload | Response Payload | Unreal | Unity | OSS |
---|---|---|---|---|---|
Send personal chat | type: personalChatRequest\n id: message123\n to: user456\n payload: content 123 | type: personalChatResponse\n id: message123\n code: 0 | Lobby::SendPrivateMessage(const FString& UserId , const FString& Message) | SendPersonalChat(string userId, string chatMessage, ResultCallback callback) | N/A |
Receive personal chat | type: personalChatNotif\n id: message123\n from: user123\n to: user456\n payload: content 123\n receivedAt: 2018-11-25T23:45:05Z | SetPrivateMessageNotifDelegate(FPersonalChatNotif OnPersonalChatNotif) | PersonalChatReceived | N/A | |
Send party chat | type: partyChatRequest\n id: message123\n payload: content 123 | type: partyChatResponse\n id: message123\n code: 0 | Lobby::SendPartyMessage(const FString& Message) | SendPartyChat(string chatMessage, ResultCallback callback) | N/A |
Receive party chat | type: partyChatNotif\n id: message123\n from: user123\n to: user456\n payload: content 123\n receivedAt: 2018-11-25T23:45:05Z | SetPartyChatNotifDelegate(FPartyChatNotif OnPersonalChatNotif) | PartyChatReceived | N/A | |
Join default chat channel | type: joinDefaultChannelRequest\n id: message123\n | type: joinDefaultChannelRequest\n id: message123\n channelSlug: slug | Lobby::SendJoinDefaultChannelChatRequest() | JoinDefaultChatChannel( ResultCallback<ChatChannelSlug> callback ) | N/A |
Send channel chat | type: sendChannelChatRequest\n id: message123\n channelSlug: %s\n payload: %s\n | type: sendChannelChatResponse\n id: message123\n code: 0\n message: message123 | Lobby::SendChannelMessage(const FString& Message) | SendChannelChat( string chatMessage, ResultCallback callback ) | N/A |
Channel chat notif | type: channelChatNotif\n from: user123\n channelSlug: slug\n payload: message123\n sentAt: 123123\n | SetChannelMessageNotifDelegate(FChannelChatNotif OnChannelMessageNotif) | ChannelChatReceived | N/A |
Friends
Command | Request Payload | Async Response Payload | Unreal | Unity |
---|---|---|---|---|
Request Friend | type: requestFriendsRequest\n id: message123\n friendId: user123 | type: requestFriendsResponse\n id: message123\n code: 0 | Lobby::RequestFriend(FString UserId) | RequestFriend(string userId, ResultCallback callback) |
Request Friends By PublicID | type: RequestFriendsByPublicID\n | Lobby::RequestFriendByPublicId(FString PublicId) | RequestFriendByPublicId(string publicId, ResultCallback callback) | |
Friend request notification | type: requestFriendsNotif\n friendId: user123 | SetOnIncomingRequestFriendsNotifDelegate(const FRequestFriendsNotif& OnRequestFriendsNotif) | OnIncomingFriendRequest | |
Unfriend | type: unfriendRequest\n id: message123\n friendId: user123 | type: unfriendResponse\n id: message123\n code: 0 | Lobby::Unfriend(FString UserId) | Unfriend(string userId, ResultCallback callback) |
List of Friends Request V2 | type: ListFriendsRequestV2\n id: message123 | N/A | N/A | |
List outgoing friend request | type: listOutgoingFriendsRequest\n id: message123 | type: listOutgoingFriendsResponse\n id: message123\n code: 0\n friendsId: [user123,user456,]\n | Lobby::ListOutgoingFriends() | ListOutgoingFriends(ResultCallback<Friends> callback) |
Cancel outgoing friend request | type: cancelFriendsRequest\n id: message123\n friendId: user123 | type: cancelFriendsResponse\n id: message123\n code: 0 | Lobby::CancelFriendRequest(FString UserId) | CancelFriendRequest(string userId, ResultCallback callback) |
List incoming friend request | type: listIncomingFriendsRequest\n id: message123 | type: listIncomingFriendsResponse\n id: message123\n code: 0\n friendsId: [user123,user456,] | Lobby::ListIncomingFriends() | ListIncomingFriends(ResultCallback<Friends> callback) |
List Incoming Friends With Time | type: ListIncomingFriendsWithTimet\n | Lobby::ListIncomingFriendsWithTime() | ListIncomingFriendsWithTime(ResultCallback<FriendsWithTimestamp> callback) | |
List Outgoing Friends With Time | type: ListOutgoingFriendsWithTimet\n | Lobby::ListOutgoingFriendsWithTime() | ListOutgoingFriendsWithTime(ResultCallback<FriendsWithTimestamp> callback) | |
Accept incoming friend request | type: acceptFriendsRequest\n id: message123\n friendId: user123 | type: acceptFriendsResponse\n id: message123\n code: 0 | Lobby::AcceptFriend(FString UserId) | AcceptFriend(string userId, ResultCallback callback) |
Friends acceptance notification | type: acceptFriendsNotif\n friendId: user123 | SetOnFriendRequestAcceptedNotifDelegate(const FAcceptFriendsNotif& OnAcceptFriendsNotif) | FriendRequestAccepted | |
Reject incoming friend request | type: rejectFriendsRequest\n id: message123\n friendId: user123 | type: rejectFriendsResponse\n id: message123\n code: 0 | Lobby::RejectFriend(FString UserId) | RejectFriend(string userId, ResultCallback callback) |
List current friends | type: listOfFriendsRequest\n id: message123 | type: listOfFriendsResponse\n id: message123\n code: 0\n friendsId: [user123,user456,] | Lobby::LoadFriendsList() | LoadFriendsList(ResultCallback<Friends> callback) |
Get friendship status | type: getFriendshipStatusRequest\n id: message123\n friendId: user123 | type: getFriendshipStatusResponse id: message123 code: 0 friendshipStatus: 3 | Lobby::GetFriendshipStatus(FString UserId) | GetFriendshipStatus(string userId, ResultCallback<FriendshipStatus> callback) |
Unfriend notif | type: unfriendNotif\n friendId: user123 | SetOnUnfriendNotifDelegate(const FUnfriendNotif& OnUnfriendNotif) | OnUnfriend | |
Cancel friend notif | type: cancelFriendsNotif\n userId: user123 | SetOnCancelFriendsNotifDelegate(const FCancelFriendsNotif& OnCancelFriendsNotif) | FriendRequestCanceled | |
Reject friend notif | type: rejectFriendsNotif\n userId: user123 | SetOnRejectFriendsNotifDelegate(const FRejectFriendsNotif& OnRejectFriendsNotif) | FriendRequestRejected |
Presence
Command | Request Payload | Async Response Payload | Unreal | Unity | OSS |
---|---|---|---|---|---|
Set user status | type: setUserStatusRequest\n id: message123\n availability: 1\n activity: in party looking for members | type: setUserStatusResponse\n id: message123\n code: 0 | Lobby::SendSetPresenceStatus(const EAvailability Availability , const FString& Activity) | SetUserStatus(UserStatus status, string activity, ResultCallback callback) | void FOnlinePresenceAccelByte::SetPresence(const FUniqueNetId& User, const FOnlineUserPresenceStatus& Status, const FOnPresenceTaskCompleteDelegate& Delegate) |
Set user status v2 | type: setUserStatusRequestv2\n | N/A | N/A | ||
Notify status | type: userStatusNotif\n userID: 123\n availability: 1\n activity: idle | SetUserPresenceNotifDelegate(FFriendStatusNotif OnUserPresenceNotif) | FriendsStatusChanged | OnPresenceReceived | |
List all friends presence | type: friendsStatusRequest\n id: message123 | type: friendsStatusResponse\n id: message123\n code: 0\n friendsId: [uid1,uid2,uid3,]\n availability: [1,2,1,]\n activity: [playing mahjong ultra,null,in deatmatch shootergame,]\n lastSeenAt: [2018-09-30T06:42:57Z,2018-11-30T06:42:57Z,2018-10-21T06:42:57Z,] | Lobby::SendGetOnlineFriendPresenceRequest() | ListFriendsStatus(ResultCallback<FriendsStatus> callback) | N/A |
Block Player
Command | Request Payload | Async Response Payload | Unreal | Unity |
---|---|---|---|---|
Block player | type: blockPlayerRequest\n id: message123\n userId: user123\n blockedUserId: user456\n namespace: sdktest | type: blockPlayerResponse\n id: message123\n code: 0\n namespace: ns\n blockedUserId: user123 | Lobby::BlockPlayer(const FString& UserId) | BlockPlayer(string userId, ResultCallback<BlockPlayerResponse> callback) |
Get Blocked Player | type: GetBlockedPlayer\n | *used REST API | *used REST API | |
Block player notif | type: blockPlayerNotif userId: user123\n blockedUserId: user456\n | SetBlockPlayerNotifDelegate(FBlockPlayerNotif OnBlockPlayerNotif) | PlayerBlockedNotif | |
Unblock player | type: unblockPlayerRequest\n id: message123\n userId: user123\n unblockedUserId: user456\n namespace: ns | type: unblockPlayerResponse\n id: friends-5358\n code: 0\n namespace: ns\n unblockedUserId: user456\n | Lobby::UnblockPlayer(const FString& UserId) | UnblockPlayer(string userId, ResultCallback<UnblockPlayerResponse> callback) |
Unblock player notif | type: unblockPlayerNotif userId: user123\n unblockedUserId: user456\n | SetUnblockPlayerNotifDelegate(FUnblockPlayerNotif OnUnblockPlayerNotif) | PlayerUnblockedNotif |
Notifications
Being sent notification | type: messageNotif\n subject: updateNotification\n from: system\n to: user123\n topic: 1111\n payload: message content 123\n sentAt: 2018-11-25T23:45:05Z | SetMessageNotifDelegate(const FMessageNotif& OnNotificationMessage) | OnNotification | Used only to print log internally | |
---|---|---|---|---|---|
Sent ban notification | type: userBannedNotification\n id: message123\n code: 12002\n userId: user123\n ban: BAN-TYPE\n reason: BAN-REASON\n endDate: 2022-05-11 16:21:36.688 +0000 UTC\n enable: true | SetUserBannedNotificationDelegate(FUserBannedNotification OnUserBannedNotification) | UserBannedNotification | N/A | |
Sent unban notification | type: userUnbannedNotification\n id: message123\n code: 12002\n userId: user123\n ban: BAN-TYPE\n reason: BAN-REASON\n endDate: 2022-05-11 16:21:36.688 +0000 UTC\n enable: false | SetUserUnbannedNotificationDelegate(FUserUnbannedNotification OnUserUnbannedNotification) | UserUnbannedNotification | N/A |
Matchmaking v1
Command | Request Payload | Async Response Payload | Unreal | Unity | OSS |
---|---|---|---|---|---|
Start matchmaking | type: startMatchmakingRequest\n id: message123\n gameMode: default\n partyId: party123\n memberId: [user1,user2,user3,] | type: startMatchmakingResponse\n id: message123\n code: 0 | Lobby::SendStartMatchmaking(const FString& GameMode, const FMatchmakingOptionalParams& OptionalParams) | StartMatchmaking(string gameMode, MatchmakingOptionalParam param, ResultCallback<MatchmakingCode > callback) | bool FOnlineSessionV1AccelByte::StartMatchmaking(const TArray<TSharedRef<const FUniqueNetId>>& LocalPlayers, FName SessionName, const FOnlineSessionSettings& NewSessionSettings, TSharedRef<FOnlineSessionSearch>& SearchSettings ) |
Cancel matchmaking | type: cancelMatchmakingRequest\n id: message123\n partyId: party123 | type: cancelMatchmakingResponse\n id: message123\n code: 0 | Lobby::SendCancelMatchmaking(FString GameMode , bool IsTempParty) | CancelMatchmaking(string gameMode, bool isTempParty, ResultCallback<MatchmakingCode> callback) | bool FOnlineSessionV1AccelByte::CancelMatchmaking(int32 SearchingPlayerNum, FName SessionName) |
Clear Matchmaking Request | type: ClearMatchmakingRequest\n | N/A | N/A | N/A | |
Matchmaking notification | type: matchmakingNotif\n status: <start / timeout / cancel / done / unavailable> \n matchId: match123 partyMember: [user1,user2,user3,user4,user5,] counterPartyMember: [user6,user7,user8,user9,user10,] | SetMatchmakingNotifDelegate(FMatchmakingNotif OnMatchmakingNotification) | MatchmakingCompleted | If matchmaking status == start OnMatchmakingStarted If matchmaking status == Cancel OnCancelMatchmakingComplete If matchmaking status == Done OnReadyConsentRequested If matchmaking status == Timeout OnMatchmakingFailed Other status OnMatchmakingFailed | |
Set ready consent | type: setReadyConsentRequest\n id: message123\n matchid: match123 | type: setReadyConsentResponse\n id: message123\n code: 0 | Lobby::SendReadyConsentRequest(FString MatchId) | ConfirmReadyForMatch(string matchId, ResultCallback callback) | void FOnlineSessionV1AccelByte::SendReady(int32 LocalUserNum, const FString& MatchId, const FOnSendReadyConsentComplete& Delegate) |
Set ready consent notif | type: setReadyConsentNotif\n matchId: match123\n userId: user123\n | SetReadyConsentNotifDelegate(FReadyConsentNotif OnReadyConsentNotification) | ReadyForMatchConfirmed | N/A | |
Set Reject Consent | type: setRejectConsentRequest\nid: message123\n matchid: match123 | type: setRejectConsentResponse\n id: message123\n code: 0\n matchId: id123 | Lobby::SendRejectConsentRequest(FString MatchId) | RejectMatch(string matchId, ResultCallback callback) | N/A |
Set reject consent notif | type: setRejectConsentNotif\nmatchId: id123\nuserId: id345 | SetRejectConsentNotifDelegate(FRejectConsentNotif OnRejectConsentNotification) | MatchRejected | N/A | |
Rematchmaking notif | type: rematchmakingNotif\n banDuration: 0 | SetRematchmakingNotifDelegate(FRematchmakingNotif OnRematchmakingNotification) | RematchmakingNotif | N/A | |
Ds Notif | type: dsNotif\n matchId: match123\n namespace: ns\n podName: podname123\n region: region\n imageVersion: ver123\n ip: 0.0.0.0\n alternateIPs: \n port: 77777\n ports: {"custom":30847, "custom2":23246}\n protocol: udp\n serverVersion: version123\n provider: provider\n status:< CREATING / READY / BUSY >\n deployment: deployment\n customAttribute: attrb123\n isOK: true\n message: message | SetDsNotifDelegate(FDsNotif OnDsNotification) | DSUpdated | OnMatchmakingComplete | |
Create DS | type: createDSRequest id: message123\n matchId: match123\n gameMode: mode123\n serverName: server1234\n clientVersion: ver123\n region: region123\n deployment: deployment123\n | type: createDSResponse\n id: message123\n code: 0 | Lobby::RequestDS(FString const& SessionID , FString const& GameMode , FString const& ClientVersion , FString const& Region , FString const& Deployment , FString const& ServerName) | RequestDS(CustomDsCreateRequest request) | N/A |
A canceled match invalidates startMatchmakingRequest
response.
Create DS will trigger DS Notif on success.
Signaling P2P
Command | Request Payload | Async Response Payload | Unreal | Unity | OSS |
---|---|---|---|---|---|
Send Signaling | type: signalingP2PNotif\n id: message123\n destinationId: user123\n message: message123 | type: signalingP2PNotif\n id: message123\n destinationId: user123\n message: message123 | Lobby::SendSignalingMessage(const FString& UserId, const FString& Message) | SendSignalingMessage(string userId, string message) | N/A |
Session Attribute
Command | Request Payload | Async Response Payload | Unreal | Unity |
---|---|---|---|---|
Set session attribute | type: setSessionAttributeRequest\n id: message123\n namespace: ns\n key: key123\n value: value123 | type: setSessionAttributeResponse\n id: message123\n code: 0 | Lobby::SetSessionAttribute(const FString& Key , const FString& Value) | SetSessionAttribute( string key, string value, ResultCallback callback ) |
Get session attribute | type: getSessionAttributeRequest\n id: message123\n namespace: ns\n key: key123 | type: getSessionAttributeResponse\n id: message123\n code: 0\n value: value123 | Lobby::GetSessionAttribute(const FString& Key) | GetSessionAttribute(string key, ResultCallback<GetSessionAttributeResponse> callback) |
Get all session attribute | type: getAllSessionAttributeRequest\n id: message123\n namespace: ns | type: getAllSessionAttributeResponse\n id: message123\n code: 0\n attributes: {"key": "value", "key1": "value1"} | Lobby::GetAllSessionAttribute() | GetSessionAttributeAll(ResultCallback<GetSessionAttributeAllResponse> callback) |
Refresh Token
Command | Request Payload | Async Response Payload | Unreal | Unity |
---|---|---|---|---|
Refresh Token | type: refreshTokenRequest\n id: message123\n token: token123 | type: refreshTokenResponse\n id: message123\n code: 0 | Lobby::RefreshToken(const FString& AccessToken) | RefreshToken( string newAccessToken, ResultCallback callback ) |
Error Notifications
Command | Request Payload | Async Response Payload | Unreal | Unity |
---|---|---|---|---|
Error Notif | type: errorNotif\n code: 429\n message: message123 | SetErrorNotifDelegate(FErrorNotif OnErrorNotif) | ErrorNotification |