PureEngage On-Premises

 View Only

Sign Up

  • 1.  Configuration SDK Code samples?

    Posted 08-14-2014 19:20
    Are there any code samples for how to use the configuration SDK (other than those in the reference manual)?  I am looking for a code sample to authenticate a user against config.  For examle, I want to connect to the configuration server and then provide a plain text user_name and password and find out if the user is a valid user.


  • 2.  RE: Configuration SDK Code samples?

    Posted 03-26-2015 19:34
    Hi Becky,

    I know this is an old post.  Trying to be a good citizen and help build up the knowledge.  Here is an example in C# / winforms.  With this example I authenticate with default/password.  Note that with this example an app would need to be created of type "Third Party App".
     
    private Endpoint GenesysEndpoint;
            private ConfServerProtocol GenesysConfServerProtocol;
            private IConfService GenesysConfigService;
    
            private void button1_Click(object sender, EventArgs e)
            {
                try
                {
                    GenesysEndpoint = new Endpoint("default", "csrdgenadm01", 2020);
                    GenesysConfServerProtocol = new ConfServerProtocol(GenesysEndpoint);
    
                    GenesysConfServerProtocol.ClientApplicationType = (int)CfgAppType.CFGThirdPartyApp;
                    GenesysConfServerProtocol.ClientName = "Some_App_Of_Type_3rd_Party_App";
                    GenesysConfServerProtocol.UserName = "default";
                    GenesysConfServerProtocol.UserPassword = "password";
    
                    GenesysConfigService = ConfServiceFactory.CreateConfService(GenesysConfServerProtocol);
    
                    GenesysConfServerProtocol.Open();                                
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error: " + ex.Message);
                }
            }