question

Robin Walmsley avatar image
Robin Walmsley asked Robin Walmsley answered

API to get tax_rates always fails with 401 error

Im puzzled because the code Im using (php) has been in place for over a year and only started misbehaving this week.
Im always receiving a 401 error when attempting an API GET for tax_rates.
To check there wasn't an issue, I placed a GET for employees before the tax_rate code and that worked fine.
Im using the exact same auth_token, merchant ID etc. Its all identical code, except the url end point ends in /tax_rates as opposed to /employees.
This happens both in the live system and sandbox.
I have launched the web app from the Clover dashboard, signed in as the store owner.
So I can't see what the issue is.
Ideas?

API TokenTaxes
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image
Lee Tickett answered
Still working ok on my sandbox account. Hopefully it has maybe resolved itself?
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lee Tickett avatar image
Lee Tickett answered
The other thing to check; do you have the inventory read permission?
If it used to work I'm puzzled, but Clover may have made a change to the permissions needed for the API call.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Robin Walmsley avatar image
Robin Walmsley answered
Thanks Lee that's it. Yes I changed the read permission on the Inventory recently. I had assumed (wrongly) that tax_rates permission were associated with the Merchant not the Inventory.
Thanks for your help.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community