how to use API with localhost

388 views
Skip to first unread message

Yusuf Said CANBAZ

unread,
Dec 30, 2020, 3:15:55 PM12/30/20
to DrChrono API Developers
Hi

Can we use API with localhost? I'm trying to make API calls from localhost. I'm following https://drchrono.com/api-docs/ (by the way loading this page takes a little long like 10 secs)

I set my app URL as http://localhost:4200/


redirect link to my app works file. I get a "code".

Then I want to get an "access_token" . Firstly I get a "CORS" error from my client-side application which I think I should not. I think you should let everybody use the API for getting a token.
 
To overcome this problem, I simply make my own simple server which acts as a proxy server. Things are OK. But when I make an HTTP request to get an  "access_token"  using my proxy server I get this error.

 
My proxy server address is localhost:3000. Would that be the reason? 

Again my broad question is How can I use API with localhost?

thank you

bri...@drchrono.com

unread,
Jan 5, 2021, 5:46:17 PM1/5/21
to DrChrono API Developers
You can use a localhost as a redirect URI with DrChrono's API. If you continue to receive an error please send the response.

Yusuf Said CANBAZ

unread,
Jan 6, 2021, 9:37:33 AM1/6/21
to drchro...@googlegroups.com
below is the error as JSON.

{"name":"HTTPError","timings":{"start":1609910474757,"socket":1609910474758,"lookup":1609910474889,"connect":1609910474903,"secureConnect":1609910474940,"upload":1609910474940,"response":1609910475534,"end":1609910475538,"phases":{"wait":1,"dns":131,"tcp":14,"tls":37,"request":0,"firstByte":594,"download":4,"total":781}}}

Sorry, the inline images are somehow are not visible in my previous email.

I think If you want to take the attention of developers the first thing you should do is a step-by-step guide about development and testing in localhost. I gave up on the hackathon because of this.

regards

--
You received this message because you are subscribed to the Google Groups "DrChrono API Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drchrono-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drchrono-api/ff4a32b3-ea15-4b1b-9ded-d21f541316e1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages