groupsharekit.net icon indicating copy to clipboard operation
groupsharekit.net copied to clipboard

Project.PublishPackage() - An error occurred with this API request - Status code BadRequest

Open halilkerimi opened this issue 5 years ago • 0 comments

I am trying to use PublishPackage method and I get BadRequest response The code I am using:

            try
            {
                var token = await GroupShareClient.GetRequestToken("Username", "Passwrd", new Uri("https://localhost/"), GroupShareClient.AllScopes);

                var groupshareClient = await GroupShareClient.AuthenticateClient(token, "Username", "Passwrd", "", new Uri("https://localhost/"), GroupShareClient.AllScopes);

            

                byte[] data = File.ReadAllBytes(@"D:\Projects\GroupshareAPI\Project 1.sdlppx");

                CreateProjectRequest project = new CreateProjectRequest("API06", "1f5f8f21-95b6-4eff-a1ca-bec52d8c1aa1", "desc", DateTime.Now, "7098bb30-ba69-4da6-bb44-194aafbdae3b", data);
                var res = await groupshareClient.Project.PublishPackage(project);
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

Error Message:

{"An error occurred with this API request - Status code BadRequest"}
System.Exception {Sdl.Community.GroupShareKit.Exceptions.ApiException}

halilkerimi avatar Sep 28 '20 09:09 halilkerimi