revdotcom/revai-node-sdk

use in chrome extension

Closed this issue · 1 comments

Is it possible to use the streaming api in a chrome extension ?
When I tried, I first had issue with 'fs' module being unavailable, but it doesn't seem necessary for my use case.
After deletion of 'fs' references,
the code block on this call:

        client = new revai.RevAiStreamingClient(token, audioConfig)

It is not recommended to use the API directly from the browser since the authentication mechanism uses bearer tokens and you will be exposing the tokens to the client in the browser.

The recommended approach is to authenticate your own connection to your own server and connect to the Rev AI API from your server.