EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

EmbeddedChat connecting 401 (Unauthorized)

Open IgorDevR opened this issue 2 years ago • 2 comments

I started the server on a virtual machine with ubuntu. I configured it to my IP address.

I created a client separately, in the client I can receive a token using a login and password, register users, create channels, receive channels.

I'm adding a chat component to react <EmbeddedChat host={RocketChatBaseUrl} roomId="659fe0328178c3edbc8efe7a" auth={{ flow: 'TOKEN', credentials: { accessToken: 'wEOzAoEV8tNV9qO78rXVps7kci7ZhlIsgk1U23сRsWe', }, }} /> and I get the error: "GET http://192.168.222.132:3000/api/v1/channels.members?roomId="659fe0328178c3edbc8efe7a" 401 (Unauthorized)

I don't understand why I can do various things, but when I add a component I get a 401 (Unauthorized) error.

Скриншот 11 01 24_22 27 20

IgorDevR avatar Jan 11 '24 15:01 IgorDevR

Is your channel private ?

Spiral-Memory avatar Feb 13 '24 19:02 Spiral-Memory

I got exactly the same issue, after successful api/v1/login authorisation request it does not set auth headers to requests to get room details Screenshot 2024-07-24 at 18 18 39 Screenshot 2024-07-24 at 18 18 26

ponomarenkotema avatar Jul 24 '24 16:07 ponomarenkotema