Closed Alirss closed 4 years ago
I haven't worked with Woocommerce yet, but 401 indicates there's an auth issue. Are you able to get regular posts using the credentials you've passed?
@Alirss seems that you should set parameter useAuth to true
var forms = client.CustomRequest.Get<IEnumerable<OrderItems>>("wc/v3/customers/" + client.Users.GetCurrentUser().Result.Id + "/downloads", useAuth: true);
by default all GET requests performs without providing authorization header
@Alirss seems that you should set parameter useAuth to true
var forms = client.CustomRequest.Get<IEnumerable<OrderItems>>("wc/v3/customers/" + client.Users.GetCurrentUser().Result.Id + "/downloads", useAuth: true);
by default all GET requests performs without providing authorization header
Thank for your answer. But this method does not make a difference.
I haven't worked with Woocommerce yet, but 401 indicates there's an auth issue. Are you able to get regular posts using the credentials you've passed?
Yes. Everything else is almost working.
OK. I did something different.
Using a small "API", I matched the orders with the user's email. This gives me "Product_id" , "DownloadKey" and "Orderkey" , which can also be used to find the product name.
So the download link will be like this : https://example.com/?download_file="Product_id"&order="Orderkey"&email="Email"&key="DownloadKey"
So my problem is solved. I hope this problem will be fixed in the future.
Hello.
I am working on a small project. Users log in to their account and they see a list of their downloadable orders.
But there is always 401 error.
`
public class OrderItems { public string download_id; public string download_url; public int? product_id; public string product_name; }
`
Is there a way to see the orders download link?