question

ihor avatar image
ihor asked ihor commented

https://apisandbox.dev.clover.com vs https://sandbox.dev.clover.com

Hi,

Could someone explain please, what is difference between URLs mentioned in the question topic.

I am developing Android application. In my case, I needs to fetch orders for merchant. Merchant v3 doesn't maps correctly in Clover's SDK, so in Clover's API docs I've found https://www.clover.com/api_docs#!/ord... call. For test purposes I've used https://apisandbox.dev.clover.com URL to make this API call, due to Clover's REST API documentation https://docs.clover.com/build/web-app.... It works fine.

But, yesterday, I've noticed that this call became didn't work due to 401 authorization error. Investigating merchant object(see code)

App app = mAppsConnector.getApp();
Merchant merchant = app.getMerchant();

I've found that the sandbox URL is different. I've tried to call orders request from JSON representation of Merchant and it works fine. But it also work without auth token, so it a little bit confusing and looks like security issue.

Thanks.

SandboxMerchant
10 |2000

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

1 Answer

Mike M avatar image
Mike M answered ihor commented

https://apisandbox.dev.clover.com represents the API endpoint for Sandbox

https://sandbox.dev.clover.com is the host for the Sandbox environment

That being said, from my testing, both work for API requests.

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.

ihor avatar image ihor commented ·

Thank you. I have an issue with incorrect token, because I've incorrect set application permissions and modules.

0 Likes 0 ·

Welcome to the
Clover Developer Community