question

adityaer avatar image
adityaer asked cladius commented

APIs NOT working - even on the developer portal

None of the APIs on https://www.clover.com/api_docs - are working. Browser console shows there is a CORS issue. You may need to redeploy with changes

Here - is a screenshot ! image description

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.

cladius avatar image cladius commented ·

For eg: The error noticed in Chrome's console is XMLHttpRequest cannot load https://apisandbox.dev.clover.com/v3/.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://sandbox.dev.clover.com' is therefore not allowed access. The response had HTTP status code 400.

Strangely, this error occurs when the filter query is applied via the developer portal. Without the filter query things seem to be working fine.

0 Likes 0 ·

1 Answer

cladius avatar image
cladius answered cladius commented

Further investigation has revealed that there are 2 defects that need to be fixed:

1) The filter operand in the developer portal is '==" whereas it should just be '='.

2) In case of errors, the CORS headers (i.e. Access-Control-Allow-Methods, Access-Control-Allow-Origin) are missing in the response. This leads to errors in the Browser's console instead of the error showing up in the actual page.

3 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.

Mark Mullan avatar image Mark Mullan commented ·

Hi @Cladius,

What browser are you seeing the CORS error in? Our US PROD API docs are working fine for me in Chrome.

Thanks,

Mark

0 Likes 0 ·
cladius avatar image cladius commented ·

Hi Mark,

As mentioned in my comments, the issue happens only when a filter query is set and the operand of equality check is selected. All other requests are working fine for me. FYI, I am encountering the issue on Google Chrome (55.0.2883.87). I would like to attach a screenshot but I am unable to find an option to do so.

Regards, Cladius

0 Likes 0 ·
cladius avatar image cladius commented ·

Hi @mark.mullan

Were you able to reproduce the issue or do you need more pointers?

Regards, Cladius

0 Likes 0 ·

Welcome to the
Clover Developer Community