Skip to content

Instantly share code, notes, and snippets.


nparsons08/client.js Secret

Created Feb 26, 2020
What would you like to do?
let client, channel, username;
async function generateToken(username) {
const { token } = (
await axios.get(`/server.php?create-token=${username}`)
return token;
// Initialize the JavaScript chat SDK
client = new StreamChat('<STREAM_APP_KEY>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.