easemob / react-native-chat-sdk

MIT License
2 stars 10 forks source link

Error 208 on createAccount #4

Closed EkaanshArora closed 2 years ago

EkaanshArora commented 2 years ago

Log:

 ChatClient: createAccount: Test, test
 LOG  register: fail {"code": 208, "description": "Registration failed."}

Code:

     ChatClient.getInstance()
      .createAccount(username, password)
      .then(() => {
        console.log('register: success');
        setWarnText('register: success');
      })
      .catch(reason => {
        console.log('register: fail', reason);
        setWarnText('register: fail' + reason);
      });
githubzhaoliang commented 2 years ago

the reason is app is not open registration by default (can create account with app token via REST api), now I update it to open registration, now you can try the createAccount API again