We encountered the below issue.
we provided the token and the serial number 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-e746-02d9-d24d-d8e664f1d83e");
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"
}