API authentication issue - CORS

162 views
Skip to first unread message

Alexey Chub

unread,
Feb 21, 2018, 5:14:25 AM2/21/18
to Clio Developers
Hi,
I want to open a window app.clio.com/oauth/authorize in javascript.
Then, read a success code after user allows app.
BUT
can't do that because of CORS - can't access even the window's title.

The question is:
May I define Allowed Origins (CORS) somewhere?
Or, may be another way to get rid on this issue.

Thanks in advance.

matthe...@clio.com

unread,
Feb 23, 2018, 1:51:17 PM2/23/18
to Clio Developers

Hi Alexey,

I'm curious about your use case.  What are you trying to build? 

Check out the OAuth2 authentication section of  https://app.clio.com/api/v4/documentation as that may help.

Matt
Message has been deleted

Kiran Peddikuppa

unread,
Jul 21, 2018, 6:29:10 PM7/21/18
to Clio Developers
Clio API's cannot be accessed by JavaScript. It is definitely CORS issue.

We faced the same problem for a long time and had to write a PHP bridge to enable CORS to consume Clio API's

I can be of some help in case you need

Thanks

KIRAN

Olaf Becker

unread,
Aug 4, 2020, 5:34:07 PM8/4/20
to Clio Developers
Actually you can :-)

You will have to create a simple NodeJS express server (javascript) to proxy to the clio API, then make calls from your frontend to the express server where you can handle the cors issues.

See https://github.com/report-zone/data-generator for an example on how to do this.


On Wednesday, February 21, 2018 at 2:14:25 AM UTC-8, Alexey Chub wrote:
Reply all
Reply to author
Forward
0 new messages