PrestaSharp
PrestaSharp copied to clipboard
401 unauthorized
Hello, i'm kind of new on Web Services i downloaded Prestashop and PrestaSharp since i'm programming on C#. For some days i get 401 unathorized error (also HttpStatusCode Not Found) when i'm trying to create access to my localhost/prestashop/api and i really cannot understand where is the problem even if i ctrl+click on the url. Can you help me please? Below is the code, thank you
private void btnRead_Click(object sender, EventArgs e) { string BaseUrl = "http://localhost/prestashop/api/"; string Account = "...API KEY here..."; string Password = ""; Bukimedia.PrestaSharp.Entities.product Product = ProductFactory.Get(8); Product.id = 8; Product.active = 1; ProductFactory.Add(Product); ProductFactory.Update(Product); ProductFactory.Delete(Product);
label1.Text = "";
}
UPDATE: Ok i fixed it by adding at the end -> /manufacturers&ws_key=...API hey here..."
My other question is: Do i need to write something extra except the "List