1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Sendbird Issue Connecting Without Access Token Despite “Read & Write” Permission Enabled using...

Discussão em 'Angular' iniciado por Siji B J, Julho 29, 2025.

  1. Siji B J

    Siji B J Guest

    I am trying to integrate the Sendbird JavaScript SDK into my Angular 8 application. However, I’m unable to connect a user without providing an access token, even though the “Allow users without access tokens” setting in the dashboard is set to “Read & Write”. I get error when calling the connect() method without passing a token.


    SendBirdException: This session token is invalid
    ​

    [SDK Version]
    Sendbird JavaScript SDK v3.1.33

    [Reproduction Steps]

    In the Sendbird dashboard, navigate to Settings > Application > Security.
    Set “Allow users without access tokens” to “Read & Write”.
    In Angular 8 app using Sendbird JS SDK v3.1.33

    this.sendBirdChatService
    .connect(userId) // No token
    .then(user => {
    this.currentUser = user;
    this.connected = true;
    })
    .catch(err => {
    console.error(‘Connection error:’, err);
    });

    SendBirdChatService.ts

    connect(userId: string): Promise {
    return new Promise((resolve, reject) => {
    this.sendBird.connect(userId, (user, error) => {
    if (error) {
    reject(error);
    } else {
    resolve(user);
    }
    });
    });
    }


    Console Error

    chat.component.ts:91 Connection error: SendBirdException: This session token is invalid.

    error.handler.ts:9 Error: Uncaught (in promise): SendBirdException: This session token is invalid.
    SendBirdException: 400302

    Continue reading...

Compartilhe esta Página