question

mark3 avatar image
mark3 asked Miguel Deactivated commented

401 Error- Unauthorized access while trying to connect API

we are able to generate access token but every time we try to use access token to fetch merchant details via API, it gives us unauthorized access error
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.

sam avatar image
sam Deactivated answered
Make sure your app has the proper permissions. Your test merchant will need to have the app installed. If you already have the app installed AND you change the permission settings, you will need to uninstall and reinstall the app. After which you will be able to create a proper token to use for endpoints with permissions.

You can read more in details here: https://docs.clover.com/build/permissions/
10 |2000

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

mark3 avatar image
mark3 answered Miguel Deactivated commented
@Sam hello Sam. we created a new app and installed it on the test merchant via app market with all permission of read and write ticked. still we are getting the same 401 error.

We are not sure where we are going wrong. would it be possible for you to help us guide step wise?

we are only stuck at this point where once the token is generated, we are unable to use it to fetch merchant data.
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.

sam avatar image sam commented ·

Try following this video step by step (the video accidentally skips the permission setting step so don't forget to that), and let me know if you can get it to work: https://www.youtube.com/watch?v=6riNP_wlKcU

0 Likes 0 ·
Miguel avatar image Miguel commented ·

There's additional troubleshooting steps you can find on our developer blog: https://medium.com/clover-platform-blog/troubleshooting-common-clover-rest-api-error-codes-9aaa8885373

0 Likes 0 ·

Welcome to the
Clover Developer Community