question

1easy avatar image
1easy asked Mark Mullan Deactivated commented

401 Issue In the production server Works great @ Sandbox

I am a developer and I have written a script to using your sandbox account.
Everything works @ sandbox account.
But when we change the keys to production, it always returns 401 error.
I am pretty sure that my merchant id, access-token are valid. I don't understand what is the issue. Please help.

I got the token via OAuth2.
Request example for live account: https://api.clover.com/v3/merchants/K4DX3VAFHYS05/orders(GET Request)Headers:
Authorization: Bearer <authtoken>
Content-type: application/json, charset=utf8
Response{"message":"401 Unauthorized"}
OAuth
4 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.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Does your app have ORDERS_R permission?

0 Likes 0 ·
1easy avatar image 1easy Jeffrey Blattman ♦♦ commented ·

Where should I give that permission I do not see ORDERS_R in settings>>

Web Configuration

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ 1easy commented ·

On your developer console, under permissions for that app. This is a web app?

0 Likes 0 ·
Mark Mullan avatar image Mark Mullan commented ·

FYI - I've scrubbed the authtoken from the post body. Please do not post API tokens publicly. Thanks!

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community