question

mathew avatar image
mathew asked jtc commented

REST API Reference Broken?

I'm trying to use the https://www.clover.com/api_docs REST API Reference and no matter what I do it returns no content. I do not have an App - I'm just trying to access my data through the REST API.

I enter my production Merchant ID and the API Token I generated at the top of the page, then when I run any of the commands I get the following: Request URL

https://api.clover.com:443/v3/merchants/{My Merchant ID}
Response Body
no content
Response Code
0
Response Headers
{}

If I use Postman or go directly to the URL

https://api.clover.com/v3/merchants/{MID}/items?access_token={API Token}
Returns:
  {"message":"401 Unauthorized"}

I do not have an associated app to install/uninstall.

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

Are you using a sandbox test merchant account? If so, you will need to go to https://sandbox.dev.clover.com/api_docs

0 Likes 0 ·

No, this is for my production account.

0 Likes 0 ·

Trying using an application like Postman. It should provide a more detailed unsuccessful response code. Our API Docs page doesn't provide much info if the request was not successful. FYI, I just tested and it is working for me.

0 Likes 0 ·

I'm getting a 401 Unauthorized Message { "message": "401 Unauthorized" }

0 Likes 0 ·

I received an e-mail from Clover telling me not to use the Merchant ID, but to use the Alpha Numeric Device ID instead. Is that right? I tried both and it gives me a 401 Unauthorized message regardless.

0 Likes 0 ·
Show more comments
Dan avatar image
Dan answered mathew commented

Okay I've managed to resolve my tokens from suddenly being unauthorized by going to the App Market on the web dashboard and installing once again. I feel like perhaps after a certain period of time an app that lives on an emulator needs reinstalling from the market to re-validate the tokens it generates, but it's just a hunch :)

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.

I don't have an app to install. I'm just trying to use the REST API reference page. I did regenerate my API Token in Setup > API Token

0 Likes 0 ·
mathew avatar image
mathew answered jtc commented

I was using the wrong MID. Apparently there is a numeric and alpha-numeric MID.

  • The numeric MID is the one displayed on the right hand sidebar when you sign into your production account.
  • The alpha-numeric key is appended to the end of the link in your browser when you are logged into your merchant's web dashboard
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.

So which one is correct numeric or alpha-numeric ?

0 Likes 0 ·

It should be the alpha-numeric one.

0 Likes 0 ·

Welcome to the
Clover Developer Community