2 Replies Latest reply on Feb 18, 2016 9:17 AM by danilogarduce

    how to pass API IN ASP

    danilogarduce

      Hi Guys,

      I'm having some difficulties on how to pass people API to add user to a group. Not so sure how will I pass API.

       

      Here is my code.

       

        string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes(******* + ":" + **************));

                          client.Headers[HttpRequestHeader.Authorization] = "Basic " + credentials;

                          client.Headers[HttpRequestHeader.Accept] = "application/json";

                          client.Headers[HttpRequestHeader.ContentType] = "application/json";

                          client.Encoding = System.Text.Encoding.UTF8;

       

                          response = client.UploadString("http://*******/api/core/v3/securityGroups/1001/members/", "POST",http://******/api/core/v3/people/2026 );

       

      Thanks in advance.

       

      Danny