0

I want to write a Java program that will submit get calls to the Clover API for inventory, and return the results in a user-friendly format. I'm not sure what the best method is for doing this, as I don't have a lot of experience. Can someone walk me through the process?

Edit: The program will run locally on a laptop or desktop computer. Currently I am receiving a 401 : unauthorized error any time I try to access the API. I'm not sure why. I don't think I can use OAuth since I want it to run locally. I generated an API token through my merchant settings and I set up the URL the same as in the tutorial: https://docs.clover.com/build/web-app...

asked 2015-11-16 08:32:12 -0500

hj02 gravatar image

updated 2015-11-17 08:17:05 -0500

Comments

Is your program running on a Clover device or on the web or on another device?

jacobabrams gravatar image
jacobabrams 2015-11-16 09:29:14 -0500

1 answer

Sort by  
0

Yes if you are running code on your own machine for your own merchant then an API token is a good method of authentication. What URL are you attempting to access exactly? Did you click all the permission checkboxes next to the API token when you created it? Does curl work?

answered 2015-11-17 12:07:26 -0500

jacobabrams gravatar image
Comments

Thanks. I just got it to work. I was confused because the tutorial says to use the [Merchant ID] in the URL and in the V2 api explorer it says {mId}. On my merchant home page, there is a header that says "MID", and I have been trying to use that number to access the API. I should have been using https://www.clover.com/home/m/[STRING]. Can someone clarify the difference between the 12 digit MID number and the 13 character string in the URL on my homepage?

hj02 gravatar image
hj02 2015-11-18 08:02:22 -0500

Hmm I believe the MID shown on the homepage I believe is the First Data "Merchant Identification Number" used by the payment processor and printed on receipts. The merchant id in Clover URLs is a Clover specific ID. I agree it is confusing that there are two IDs.

jacobabrams gravatar image
jacobabrams 2015-11-18 19:07:54 -0500