简体   繁体   中英

Clover API not allowing connection using merchant api_token

I'm new to clover to if this seems elementary I apologize.

I logged into my merchant account and created an api_token. Got my mID from drop down menu on the top right. I try to do a simple request in postman like this

https://api.clover.com/v3/merchants/{mID}/items

and the response I am getting back is this

{ "message": "401 Unauthorized"}

I made sure the user token I created has the correct priviledges already and it does.

I am NOT trying to create a public app for everyone to use. I am trying to create a private script that simply syncs MY clover inventory, back to my ecommerce site.

I don't understand the purpose of being able to generate an access token in your dashboard if they are going to make you create an app

What am I doing wrong?

I have had trouble with Clover too, when I was getting that 401 error it was because I was using the wrong merchant id.

In the image I have attached below initially I was using the mId that is shown under the blue box here. But, I found that the one I really needed to use for the mId is the text under the red box. It's a 13 character string, in my example abc123456789a.

In postman a get request to get merchant information for me worked correctly like this:

https://apisandbox.dev.clover.com/v3/merchants/ {mId}

I provided headers: Authorization: Bearer {access_token} Content-Type: application/json

I hope this can assist you in some way!

商户编号

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM