getChatAccessToken()
Get the chat access token
caution
join() must be called before calling this method
Returns the bearer token (a string) used to authenticate the chat file REST endpoints, POST /api/v1/chat/upload and GET /api/v1/chat/file/:messageId. Send it in the Authorization header as Bearer <token>.
JavaScript
const token = meeting.getChatAccessToken();
const res = await fetch("https://<your-app>.metered.live/api/v1/chat/upload", {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
body,
});
See Chat file sharing for the REST upload and download endpoints.