# The taClient.addUserToMatch() method This documents the `taClient.addUserToMatch()` method.
info
Async: This is a method you would want to use await with
This method has input parameters. The function could easily be defined as: ```ts async function addUserToMatch(tournamentId: string, matchId: string, userId: string): Promise { // backend logic } ``` `tournamentId` refers to the guid of the tournament, matchId is the guid of the match, and userId is the guid of the user. ## General usage: ```ts const response: Response = taClient.addUserToMatch(tournamentGuid, matchGuid, userGuid); ``` - For `Response` please find documentation at [Models -> Response](/documentation#Models/4-Response) If you have not yet, please read [Client -> Introduction to the Client](/documentation#Client/3-client-intro) ## Standard Response: ```js { details: { updateMatch: Response_UpdateMatch, oneofKind: 'updateMatch' }, respondingToPacketId: 'packet-guid-uuidv4', type: Response_ResponseType } ``` - For `Response_UpdateMatch` please find documentation at [Models -> Response_UpdateMatch](/documentation#Models/4-Response_UpdateMatch). An implmentation example: ```ts // This method is called when we want to add ourselves to a match in order ro receive live score updates etc. async function addSelfToMatch() { // If we are not in the match already if(!match?.associatedUsers.includes(client.stateManager.getSelfGuid())) { // Add ourselves to the match const response = await client.addUserToMatch(tournamentGuid, matchGuid, client.stateManager.getSelfGuid()); console.log("Added Self to match!", response); } } ```
info
Example: This is a direct example from ShyyTAUI. It comes from the matches page of tournaments.