When I use this API to create order from the acoount of the employee ( using the authorization token that I got from Oauth2) :
var client = new RestClient("https://sandbox.dev.clover.com/v3/merchants/"+mid+ "/orders?access_token"+token ); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"employee\":{\"id\":\""+employee_id+"\"},\"total\":100}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
I got 401 unauthorized ,
But when I use the test API token that I created from the merchant dashboard it succeeded .
Can anyone say why this happens ?
Thanks in advance .