def create_group(name, desc, owner, is_public = true, maxusers = 200, is_approval = false, members = nil) 
      token =    self.auth_token()
      body  =    {groupname: name, desc: desc, public: is_public,  owner: owner, maxusers: maxusers, approval: is_approval}
      body.merge!({members: members}) unless members.nil?

      result = HTTParty.post("#{@head_url}/chatgroups", 
          :body => body.to_json,
          :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )


      if result.response.code.to_i == 200
        return result["data"]["groupid"] 
      else
        nil
      end 
    end
def create_group(name, desc, owner, is_public = true, maxusers = 200, is_approval = false, members = nil) 
      token =    self.auth_token()
      body  =    {groupname: name, desc: desc, public: is_public,  owner: owner, maxusers: maxusers, approval: is_approval}
      body.merge!({members: members}) unless members.nil?

      result = HTTParty.post("#{@head_url}/chatgroups", 
          :body => body.to_json,
          :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )


      if result.response.code.to_i == 200
        return result["data"]["groupid"] 
      else
        nil
      end 
    end
创建一个群组