question

Carl avatar image
Carl asked Carl commented

Unauthorized Error

We validate incoming connections to our server by testing the passed in Access Token against Clover in the following format:

https://www.clover.com/v3/merchants/{MerchantID}/?access_token={AccessToken}

Usually we get a response that lists the Merchant's information.

Our server now gets the response {"message":"401 Unauthorized"} with our Dev Device.

Yet if I pass the same URL to a browser on a separate computer (my development PC) it connects through fine.

I checked the Date / Time on the server and it is correct. I loaded the URL into a browser on the server and got the same {"message":"401 Unauthorized"} message. This only affects our Dev Device, but this has been working fine until now.

10 |2000

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

1 Answer

Bryanne Vega avatar image
Bryanne Vega answered Carl commented
  • Are you sure you're posting the token or code?
  • Can you post an example of your code?
  • Do you have the proper permissions set?
2 comments
10 |2000

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

Carl avatar image Carl commented ·

We are still having issues with this (our server only).

Yes, we are posting the token within the URL as shown above.

Here is an example: https://www.clover.com:443/v3/merchan...

Permissions are set, we haven't changed anything since this last worked.

0 Likes 0 ·
Carl avatar image Carl commented ·

Tokens being passed from the Android device (Clover and Asus) are not working from our server to clover.com via the url.

These Tokens are passed from Clover's API via CloverAuth.AuthResult.authToken.on the device to our server. Our server then passes the Token to Clover.com via the url

I was able to get the url to work from our server using the Token generated from the https://www.clover.com/setupapp/m/ id="">/apitokens "Generate Token" button. Is there something wrong with the API?

0 Likes 0 ·

Welcome to the
Clover Developer Community