useToken
The useToken
hook fetches a token from the given token endpoint with the given user info.
Import
import { useToken } from "@livekit/components-react";
Usage
const token = useToken(<token-endpoint>, roomName, { userInfo: { identity, name }});
Properties
roomName
string
tokenEndpoint
string | undefined
options?
UseTokenOptions
Returns
string | undefined;