Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/setUser.js Secret
Created Mar 19, 2020

Embed
What would you like to do?
const chatClient = new StreamChat(API_KEY);
const userToken = API_TOKEN; // you can retrieve this from the backend server
const user = {
id: 'green-heart-8',
name: 'Green heart',
image:
'https://stepupandlive.files.wordpress.com/2014/09/3d-animated-frog-image.jpg'
};
chatClient.setUser(user, userToken);
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.