title: Error Initiating one-to-one chat using getstream.io
body: <p>I'm trying to develop chat application using <a href="https://getstream.io/chat/docs/js/#channel_conversations" rel="nofollow noreferrer">getstream.io</a>. In the documentation we can see how to initiate a one-to-one chat like bellow</p>
  
  <pre><code>const conversation = client.channel('messaging', null, {
      members: ['ajantha', 'chana'],
  })
  </code></pre>
  
  <p>But when I try it I'm getting en error saying <strong>Error: StreamChat error code 4: GetOrCreateChannel failed with error: "When using member based IDs specify at least 2 members</strong>. This is the code sample I'm trying</p>
  
  <pre><code>async initChannel() {
      try {
        this.channel = this.client.channel('messaging', null, {
          members: ['ajantha', 'chana'],
      });
        const state = await this.channel.watch();
        console.log('channel was ceated', state);
  
        this.channel.on('message.new', event =&gt; {
          console.log('received a new message', event.message.text);
          console.log(`Now have ${this.channel.state.messages.length} stored in local state`);
        });
      } catch (e) {
        console.log('Error initiating channel', e);
      }
    }
  </code></pre>
  
  <p>Does anyone know Why I'm getting this error?</p>