question

ivan-garcia avatar image
ivan-garcia asked mtt commented

401 Error Calling the Orders Payment URL with Oauth Token but not with Web Console Token

Hello,

I have an authorization problem (error 401) while calling the API with the token generated with the Oauth process. We get the token with the Oauth process initiated by the customer. We have used this token in other Rest V3 API methods but while trying to use in the orders-payment we receive and authorization error. If I use another token generated in my test merchant web console I don't have any problem.

This is one example with the authorization problem with the token generated in the Oauth process: https://api.clover.com:443/v3/merchan...

This one example with my test Merchant ID and an Order ID ant the token, no authorization problem.

https://api.clover.com:443/v3/merchan...

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

mtt avatar image
mtt answered mtt commented
  1. Check to make sure your app has all of the required "Clover Permission Set" under the app settings.

  2. Try uninstalling and re-installing through the App Market from the web merchant dashboard

3 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.

ivan-garcia avatar image ivan-garcia commented ·

Hello,

Thanks for your answer. I have reinstalled the app in my Clover Emulator device and I have clicked in all the permissions I have left in my Clover App webpage but still the same problem.

If I use the token generated manually in my Clover Merchant webpage it works fine but for the token generated via the Oauth process I receive a 401 error.

I'm using the token to call the Orders-Payment method through the REST API.

Thanks!

0 Likes 0 ·
ivan-garcia avatar image ivan-garcia commented ·

Hello Again, Searching in the devask community I have found a service in the API to test the token. Here is the call:

https://api.clover.com/v3/access_toke...

And here is the result: http://pastebin.com/ww35nwwQ

It seems that it only has read permission for payments. How I give write permission for payments on an token generated by the Oauth process?

The token I generated manually has W permission for the payments because I gave that permission in the web setup.

0 Likes 0 ·
mtt avatar image mtt commented ·

https://docs.clover.com/build/permiss...

Strange, are you using the correct client ID?

0 Likes 0 ·

Welcome to the
Clover Developer Community