Function: fetchRoomfulToken()
@roomful/next / fetchRoomfulToken
Function: fetchRoomfulToken()
Section titled “Function: fetchRoomfulToken()”fetchRoomfulToken(
endpoint,init?):Promise<string>
Defined in: packages/next/src/index.ts:293
Fetches a Roomful token from a token endpoint created with createRoomfulTokenRoute.
Use the returned token as the core client’s relayAuth option.
Parameters
Section titled “Parameters”endpoint
Section titled “endpoint”string
The token endpoint URL.
RequestInit
Optional fetch init (for example, method, headers, or a body).
Returns
Section titled “Returns”Promise<string>
The token string.
Throws
Section titled “Throws”When the response is not ok or omits a string token.