question

kingfisher avatar image
kingfisher asked kingfisher commented

401 Error- Unauthorized access

I am not being able to connect to clover using the API token and merchand ID. I get unauthorized access as a message. What should I do to get access to Clover?

10 |2000

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

anthonypinto avatar image
anthonypinto answered woolton-dev commented

If you haven't already, follow the directions here: https://docs.clover.com/build/web-app... I recommend experimenting with curl, or another http client tool first.

If you are still having issues, please describe what exactly you are attempting in as much detail as possible.

--edit--

Looking at your additional comments (please post comments in the comment sections, instead of as answers) I recommend the following:

Confirm you have a working token with the expected permissions by POSTing to: https://apisandbox.dev.clover.com/v3/access_tokens/{yourToken}

It should return a JSON list of all the permissions on that token.

Double check that you have the correct merchant UUID (it will be in your URL when you log in to the merchant's home dashboard)

Finally, I strongly recommend testing your http request with a curl, or test client like Postman so you can isolate API issues from any potential implementation problem.

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.

woolton-dev avatar image woolton-dev commented ·

This solved our issue. Who needs to be contacted to update the documentation? Merchant ID != Merchant UUID and the documentation states over and over Merchant ID.

1 Like 1 ·
kingfisher avatar image
kingfisher answered kingfisher commented

This is the current scenario I am in,

I am trying to access Clover and integrate it real time with an ERP system. I have developed a proxy class from visual studio which would be a platform for this integration. I tested the proxy with some other API, works fine. But I am not able to gain access via the access token from setup and merchant ID. The URL I used to gain access is: https://apisandbox.clover.com/v3/merc... token].

I am currently struggling to get in into Clover for a while now.

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

Mike M avatar image Mike M commented ·

Can you please verify that you have the correct permissions applied to your access token? https://apisandbox.dev.clover.com/v3/...

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Also, I just noticed that your url is wrong. The sandbox base url is https://apisandbox.dev.clover.com, you forgot the .dev in the middle.

0 Likes 0 ·
kingfisher avatar image kingfisher commented ·

I still get the 401 unauthorized error message. The URL I used is: https://apisandbox.dev.clover.com/v3/... /employees?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.The access token I created from the setup app has read/write checked on everything. Also I have created multiple API's and tried them all with different set of permissions on different items and still I get the same 401 unauthorized message

0 Likes 0 ·
kingfisher avatar image kingfisher commented ·

To give more description on my scenario: I created a web service in Visual studio and used the URL as mentioned above to create a web service reference. Got the same error. https://www.clover.com/api_docs#!/inv.... To test my api, when I put in my api token generated from the setup app and my merchant ID from my dashboard, I do not get any response to the get commands in the above link.

0 Likes 0 ·
kingfisher avatar image kingfisher commented ·

I tried to establish connection with curl too. I get the same 401 unauthorized error. http://pastebin.com/KipbQLNF the pastebin has the output of my curl command. Any help in this matter will be highly appreciated.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community