question

mmurphy avatar image
mmurphy asked chanel Deactivated commented

Experiencing an 'Unauthorized credential' error when using the API to obtain and submit an Oauth Token

We have an application which has been in production for quite some time (1+ year). Yesterday, we started having problems getting authenticated. We have exactly the same app_id (client id) and the same private key (secret id) that we have been using successfully all this time.
We have checked the permissions on the app and these appear to be correct.
We are getting a return from the authentication API saying 'unauthorized credential'.
Here is an example of the PHP code used to submit the request:
$curl_url=clover_api_url."/oauth/token?client_id=".clover_app_id."&client_secret=".clover_appsecret."&code=".$_REQUEST['code'];

The constants used here (clover_app_id and clover_appsecret) have been verified as correct and the merchant account value is correct, as well.

This was working Monday and now is not. Nothing has changed in the code used to call the Clover OAuth API and the values of the client id ("clover_app_id" and "clover_appsecret") have not changed, either.

In our production environment we receive back a token ("code") and then receive the 'unauthorized credential' error.

In our sandbox environment we use the same program code and never get back the token ("code") to get to the next step.

https://api.clover.com:443/oauth/token?client_id=FDA0RHZW56K86&client_secret=(secret code deliberately removed for forum post)&code=9d3e9972-9a0d-5904-1e67-9b96a918995c

Here is what we get back in production:
{
"message": "Invalid OAuth credentials"
}

Has anyone experienced this issue or one like it? This is a production issue and quite serious to us.
Thanks in advance for any help or suggestions.


OAuthProduction
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chanel avatar image chanel commented ·

Hi @mmurphy@taplocalmarketing.com

I see that you've made changes to your app recently. Can you confirm what these changes were? (If need be, please use our private comment feature for sensitive information)

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community