Skip to content

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

Description

@halilkerimi

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}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions