question

jmalone30 avatar image
jmalone30 asked parquet76 commented

Retrieving Access Token fails - Unauthorized - Failed to validate authentication code.

I am using https://apisandbox.dev.clover.com/oauth/v2/token

I have the POST request package set up correctly.

This was working last night, and now today I only get the following error response:

Unauthorized

Failed to validate authentication code.

API Token
10 |2000

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

jmalone30 avatar image
jmalone30 answered

I think I may have found an issue.

If the app has not been installed, and I make a call to https://sandbox.dev.clover.com/oauth/v2/authorize, Clover takes me to the App Marketplace where I see my app and I can click the "Connect" button. Unfortunately, when I click the "Connect" button, I think that Clover sends the "old" access code back to my app, and making a request to oauth/v2/token with that access code fails.

BUT... now that the app is installed in Clover, if I make a call to https://sandbox.dev.clover.com/oauth/v2/authorize again, it skips going to the marketplace (because the app is already installed) and redirects back to my app with the correct access code and my call to oauth/v2/token is successful.

This seems to be a bug. Please correct me if I am wrong, but I cannot get an access and refresh token unless the app is already installed, which means I have to click that "Connect" button in Clover to install the app, fail in my app, then make the call to authorize again. Not very ideal.

10 |2000

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

jmalone30 avatar image
jmalone30 answered

Can someone at Clover please take a look at this? My customers are not able to authenticate when clicking on the connect button in the app marketplace. But once the app is installed, they can go successfully from my app to clover and authenticate. My suspicion is that I am using the new CORRECT authentication, and the connect button in the marketplace is not. Maybe I am wrong, but I cannot figure out why my customers cannot authentication when going to my app from the marketplace.

10 |2000

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

jmalone30 avatar image
jmalone30 answered parquet76 commented

Is anyone at Clover taking notice of this issue? Does anyone in the development community experience the same thing? How do I get support from Clover to at least acknowledge the issue, or give me a hint as to what I may be doing wrong, although I am pretty certain that I'm not doing anything wrong.

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.

parquet76 avatar image parquet76 commented ·
Your only option is to email developer relations and wait, probably a very long time. It doesn't look like anyone from Clover has been on this forum for months and months.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community