Authentication

Authentication is used to validate your identity. Authentication ensures that someone else can't reach your stock without your permission. Security always relies on a secret. For DealerBase users you enable authentication of your requests by including a private key which can be generated in www.dealerbase.co.nz portal. Securing your private key is paramount imporatnt and will be dealers responsibility.

Page Initialization

In order to reuse the same object throughout all tasks (thus use share the same communication line) store the web serive call object in session. This might not required in many situations, however this is possible.

        using TestApiDealerBase.DealerBaseService;

        private ServiceVehicleSelects _service;
        private Authentication _auth;
        private const string MyPrivateToken = "2600ee4d-bb7d-42f1-a1d2-d3e7a0ef3a4e";
        
        

                

Sample Test Connection

        [TestMethod]
        public void TestConnection()
        {
            _service = new ServiceVehicleSelects();
            _auth = new Authentication { Ticket = MyPrivateToken };
            
            _service.AuthenticationValue = _auth;

            string result = _service.HelloWorld();
            Assert.IsTrue(result.Length > 0, "Result of Hello World" + result);
        }
        
 
 
Developers  |  Terms & Conditions  |  Copyright Notice  |  Privacy Policy  |  Contact Us   © Trade Me Ltd