I have use valid the serial number and the generated token is also correct.
Please let us know why we receive this error on production. (everything works in sandbox with a test merchant)
The OAuth 2.0 token generated below OAuth flow :
Auth flow: https://www.clover.com//authorize
Token: https://api.clover.com/oauth/v2/token
Request :
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://api.clover.com/connect/v1/device/ping", Method.Get);
request.AddHeader("X-Clover-Device-Id", "{deviceId}");
request.AddHeader("X-POS-Id", "Crown Workflow");
request.AddHeader("Authorization", "Bearer 0b4893c2-XXXXXXXXX);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
Response :
{
"message": "An invalid device serial number [deviceId] or token was provided.",
"requestId": "66caf75c-1405190",
"requestType": "PING_DEVICE_GET",
"type": "BAD_REQUEST"
}
However, my production app has been submitted for approval, but it's still under review and showing as pending. so Could that be the reason for getting this error?