title: XMPPError:forbidden auth error while creating new user using smack 4.1.2
body: <p>I am trying to create user using smack client 4.1.2. I am getting below error.</p>
  
  <pre><code>Send XML on stream = &lt;&lt;"&lt;iq from='abc.example.com' to='admin@abc.example.com/Smack' id='Dym8b-14' type='error'&gt;&lt;query xmlns=jabber:iq:register&gt;&lt;password&gt;xxxxxx&lt;/password&gt;&lt;username&gt;user&lt;/username&gt;&lt;registered/&gt;&lt;/query&gt;&lt;error code=403 type=auth&gt;&lt;forbidden xmlns=urn:ietf:params:xml:ns:xmpp-stanzas/&gt;&lt;/error&gt;&lt;/iq&gt;"&gt;&gt;
  </code></pre>
  
  <p>My ejabberd config looks like below (.yml file)</p>
  
  <pre><code>register_from:
  admin: allow
  ...
  access_from: register_from
  access: register
  </code></pre>
  
  <p>I am still getting above error. Please help</p>
  
  <p>Adding code snippet to show how I create new user using smack 4.1.0</p>
  
  <pre><code>connection = new XMPPTCPConnection(getConnectionConfiguration());
                  connection.connect();
                  connection.login("admin", "admin");
                  if(connection.isAuthenticated())
                  {
                      AccountManager accountManager = AccountManager.getInstance(connection);
                      accountManager.sensitiveOperationOverInsecureConnection(true);
                      accountManager.createAccount(userName, password);
                      connection.disconnect();
                      // The account has been created, so we can now login
                      connection.login(userName, password);
                  }
  
  private XMPPTCPConnectionConfiguration getConnectionConfiguration()
  {
  
      XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
                .setServiceName("abc.example.com")
                 .setHost("abc.example.com")
                 .setPort(5222)
                .build(); 
  
      return config;
  }
  </code></pre>