I have generated access_token by using API
but when i will use this access_token as authorization header of API
I have generated access_token by using API
I have been fiddling with this for over a week now... I have a merchant account with Clover... I logged in to the Merchant account and created an "API Token"
When I try to use that token to do a Get request from Postman to
https://api.clover.com/v3/merchants/{mymerchantid}
Using my Merchant ID I got from the merchant account.
Setting Authorization to "Bearer Token" and entering the "Private Token" I got..... I always get "401 Unauthorized".
I made sure to give full rights to this token... I checked all the boxes in permissions.
What am I missing here?
Are you kidding me right now!?!? I found out my problem.... why the heck does the Clover Merchants listing have a column called "MID" that is NOT the Merchant ID?
So Stupid! This whole time I have been using the wrong Merchant ID.
Hopefully this helps someone else in the future... your Merchant ID is not just numbers... it's the code listed UNDER the Merchant name... not the numbers in the "MID" column.
This is highlighted on what the MID is in our docs: https://docs.clover.com/docs/make-a-rest-api-call#make-a-sample-rest-api-call-and-retrieve-your-test-merchants-name
Tokens need to have the correct permissions for the call you are making (in this case, Customer Read) - https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html.
In the documentation https://docs.clover.com/docs/using-oauth-20, i am using step 2 token to get access_token via API (https://sandbox.dev.clover.com/oauth/token?client_id={appId}&client_secret={APP_SECRET}&code={AUTHORIZATION_CODE}), but getting 401 when using this fetched access_token as authorization header in API https://scl-sandbox.dev.clover.com/v1/customers
I answered your question below:
Tokens need to have the correct permissions for the call you are making (in this case, Customer Read) - https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html.
3 People are following this question.