ShyyTAUI/src/lib/taDocs/3-client-getBotTokensForUser.md

1.5 KiB

The taClient.getBotTokensForUser() method

This documents the taClient.getBotTokensForUser() 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:

async function getBotTokensForUser(userId: string): Promise<Response> {
    // backend logic
}

Parameters:

  • userId (string): The GUID of the user whose bot tokens should be retrieved

General usage:

const response: Response = taClient.getBotTokensForUser(userGuid);

If you have not yet, please read Client -> Introduction to the Client

Standard Response:

{
    details: {
        getBotTokensForUser: Response_GetBotTokensForUser,
        oneofKind: 'getBotTokensForUser'
    },
    respondingToPacketId: 'packet-guid-uuidv4',
    type: Response_ResponseType
}
info
Note: This method retrieves the bot token metadata for a user but does not return the JWT itself. To view the actual JWT, you would need to use the response from `generateBotToken()`.