Fetching Data from Drchrono API and save in local database for Reporting

1,083 views
Skip to first unread message

Sunil Sharma

unread,
Mar 3, 2016, 1:56:11 AM3/3/16
to drchrono Medical Healthcare API SDK
Hi All,

As I am new to use the Drchrono API,

I want to fetch the all data related to my account from drchrono api and want to create reports on the basis of that data.
As per my initial knowledge to connect with Drchrono API need to give redirect URL, what will be the case if I use the windows based application or an window service to download data and save into local database.
Please give your ideas on this.

Thanks
Sunil

Denis Malinovskiy

unread,
Mar 3, 2016, 12:28:36 PM3/3/16
to drchro...@googlegroups.com
In your case this redirect should be hosted on your local server, e.g. http://127.0.0.1/

--
You received this message because you are subscribed to the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drchrono-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Denis

Sunil Sharma

unread,
Mar 3, 2016, 11:17:19 PM3/3/16
to drchrono Medical Healthcare API SDK
Thanks Denis for your reply but problem I am facing is getting the Bad request (400) error message.
I am using following code to connect please help me.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Net;

using System.IO;

using System.Threading.Tasks;

using System.Web.Script.Serialization;

using System.Diagnostics;

using Configuration;

namespace GetDrchronoAPIData

{

class Program

{

static void Main(string[] args)

{

// Setup the variables necessary to make the Request

string grantType = "authorization_code";

string redirect_uri = ConfigurationManager.AppSettings["REDIRECT_URI"].ToString();

string client_id = ConfigurationManager.AppSettings["CLIENT_ID"].ToString();

string client_secret = ConfigurationManager.AppSettings["CLIENT_SECRET"].ToString();

string url = "https://drchrono.com/o/token/";

HttpWebResponse response = null;

try

{

// Create the data to send

StringBuilder data = new StringBuilder();

data.Append("grant_type=" + Uri.EscapeDataString(grantType));

data.Append("&redirect_uri=" + Uri.EscapeDataString(redirect_uri));

data.Append("&client_id=" + Uri.EscapeDataString(client_id));

data.Append("&client_secret=" + Uri.EscapeDataString(client_secret));

// Create a byte array of the data to be sent

byte[] byteArray = Encoding.UTF8.GetBytes(data.ToString());

// Setup the Request

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

request.Method = "POST";

request.ContentType = "application/x-www-form-urlencoded";

request.ContentLength = byteArray.Length;

// Write data

Stream postStream = request.GetRequestStream();

postStream.Write(byteArray, 0, byteArray.Length);

postStream.Close();

// Send Request & Get Response

response = (HttpWebResponse)request.GetResponse();

using (StreamReader reader = new StreamReader(response.GetResponseStream()))

{

// Get the Response Stream

string json = reader.ReadLine();

Console.WriteLine(json);

// Retrieve and Return the Access Token

JavaScriptSerializer ser = new JavaScriptSerializer();

Dictionary<string, object> x = (Dictionary<string, object>)ser.DeserializeObject(json);

string accessToken = x["access_token"].ToString();

Console.ReadKey();

}

}

catch (WebException e)

{

// This exception will be raised if the server didn't return 200 - OK

// Retrieve more information about the error

if (e.Response != null)

{

using (HttpWebResponse err = (HttpWebResponse)e.Response)

{

Console.WriteLine("The server returned '{0}' with the status code '{1} ({2:d})'.",

err.StatusDescription, err.StatusCode, err.StatusCode);

}

}

}

finally

{

if (response != null) { response.Close(); }

}

Console.ReadLine();

}

}

}

Denis Malinovskiy

unread,
Mar 4, 2016, 1:35:57 PM3/4/16
to drchro...@googlegroups.com
If you want us to help you, please send the contents of the request you're making, and the response you're getting from our server.  I doubt anyone in our team knows enough C# to help you. :)

Sunil Sharma

unread,
Mar 5, 2016, 1:58:36 AM3/5/16
to drchro...@googlegroups.com
Hi Denis,

I already posted the code by which I am just trying to connect and want to take the authentication token first but it is not working, first need to connect then will fetch the data using different API points.
if any one in C# developer then send me the sample working code that would be great help.

Thanks
Sunil

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

Sunil Sharma

unread,
Mar 7, 2016, 3:52:01 AM3/7/16
to drchrono Medical Healthcare API SDK
Hi,

Please connect me with C# developer who can help me to integrate Drchrono api with C# console application.
Its very urgent!

Thanks
Sunil
...

Denis Malinovskiy

unread,
Mar 7, 2016, 12:07:25 PM3/7/16
to drchro...@googlegroups.com
Sunil, if you need help then send us the contents of HTTP request you're making.  We can't debug your code for you (especially C#).

For more options, visit https://groups.google.com/d/optout.



--
Denis

han...@thetalkingelephant.com

unread,
Apr 11, 2016, 10:43:34 PM4/11/16
to drchrono Medical Healthcare API SDK
Did you ever figure out a solution for this? I'm having a similar problem. I keep getting 400 bad request Mismatching redirect URI. I have tried many different variations of the redirect uri, I have used a localhost c# site, a live c# site and even a consoleapplication. I cannot get it to work. I am using the Oauth2 OWIN Middleware which the docs say to use, any help with this issue would be greatly appreciated. I've been at this for days with no solution. Please Help.

There seems to be many people online that have a similar problem with google api, however the correct redirect uri is in the google docs.

Thank you

erickl...@gmail.com

unread,
Apr 12, 2016, 11:13:55 AM4/12/16
to drchrono Medical Healthcare API SDK, han...@thetalkingelephant.com
I have the same problem. Please, help!!

han...@thetalkingelephant.com

unread,
Apr 14, 2016, 11:42:38 AM4/14/16
to drchrono Medical Healthcare API SDK, han...@thetalkingelephant.com, erickl...@gmail.com
On Tuesday, April 12, 2016 at 11:13:55 AM UTC-4, erickl...@gmail.com wrote:
> I have the same problem. Please, help!!

I've managed to successfully implement an outh2 client in c# and have authorized and received the token.

Erick,

I can definitely help you with this. Without seeing your full code and your actual request, I noticed a problem in the class you posted. It looks like you are trying to authenticate using a two legged handshake. Dr Chrono api uses a three legged approach.

You need to send a request first to the authorize endpoint with the same parameters you are using. Make sure your grant type is set to 'Authorization_Code'. There are essentially three different grant types in oauth. After you make the initial request the server will respond with a 'code' parameter. You need to parse the results and extract the code.

Then you can send a request to the token endpoint with code you have obtained and exchange it for a token.

I haven't written a C# console app in a little while so please forgive me if I am misreading something. But I am pretty sure this is your first problem.

Oauth2 can sometimes be difficult to implement depending on your setup. If you need further help, just let me know. I would probably need to see your full code, or at least your network requests to see the full flow. You're definitely on the correct path though. Don't give up.

smi...@gmail.com

unread,
Oct 14, 2016, 11:57:09 PM10/14/16
to drchrono Medical Healthcare API SDK
Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.

Erick Langford Xenes

unread,
Oct 14, 2016, 11:59:13 PM10/14/16
to drchro...@googlegroups.com

Sure, I think I can help you,  but I have the code at work.


On Oct 14, 2016 10:57 PM, <smi...@gmail.com> wrote:
Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.

--

You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.

Steve Mirson

unread,
Oct 15, 2016, 12:06:16 AM10/15/16
to drchro...@googlegroups.com

Eric,

 

That’s not a problem, will be glad to get it on Monday.

 

Thanks a lot!

 

Steve

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Erick Langford Xenes
Sent: Friday, October 14, 2016 11:59 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Sure, I think I can help you,  but I have the code at work.

On Oct 14, 2016 10:57 PM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

Sunil Sharma

unread,
Oct 15, 2016, 3:24:09 PM10/15/16
to drchro...@googlegroups.com
Hi Smirson,

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.
details I will send you tommorrow , I did in asp.net MVC C#.

Regards
Sunil


On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:
Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.
--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.

Steve Mirson

unread,
Oct 15, 2016, 3:31:45 PM10/15/16
to drchro...@googlegroups.com

Sunil,

 

I had the app already registered/created in their site, was ready to start digging into it. I also use C#, which they don’t support (judging by what they answered you) so your code sample can save me tons of grieve.

 

Thanks again!

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

Sunil Sharma

unread,
Oct 15, 2016, 11:46:47 PM10/15/16
to drchro...@googlegroups.com
Hello Steve,

As you already registered your app in drchrono API, it means you have  following parameters values:


1. Client ID
2. Client Secret
3. Redirect URI

In my case the Redirect URI is "="http//localhost:51106/Home/DrChrono"   ( It is in ASP.NET MVC Web Application) in your case will be your registered URL.
this is my web application only for getting authentication and refresh token first time  because first time drchrono required human interaction with drchrono.com web site.

in my web application UI, on click of a link I call below function which hits the drchronoapi having  above 2 parameters in query string.

HTML Code

<div class="jumbotron">

    <h1>Medical Data Tracking</h1>

    <p class="lead">Drchrono API Integration. click below to get the authentication token and referesh token</p>

    <p><a class="btn btn-primary btn-large drchrono">Call to Dr.Chrono &raquo;</a></p>

</div>

 

//Javascript code on same html page

// in below code you replace values of “rdirect_uri” with your registered app URL, and “client_id” value  

 

<script type="text/javascript">

    $(document).ready(function () {

        $(".drchrono").click(function(){

            debugger

            var url = "https://drchrono.com/o/authorize/?redirect_uri=http%3A//localhost%3A51106/Home/DrChrono&response_type=code&client_id=5aRxoDqgFT7TRsdVVaauJP2RJJToo2EeFgStQBtq&scope=patients:summary:read";

            window.location.href = url;

        });

    })

 

</script>

//Following is my server side code in ASP.NET MVC  this code is in my  "Home" controller

 public async Task<ActionResult> DrChrono(string code)
        {
            ViewBag.Message = "Calling to Dr Chrono";
            // Build up the data to POST.
            List<KeyValuePair<string, string>> postData = new List<KeyValuePair<string, string>>();
            postData.Add(new KeyValuePair<string, string>("code", code));
            postData.Add(new KeyValuePair<string, string>("grant_type", "authorization_code"));
            postData.Add(new KeyValuePair<string, string>("redirect_uri", "http://localhost:51106/Home/DrChrono"));
            postData.Add(new KeyValuePair<string, string>("client_id", client_id));
            postData.Add(new KeyValuePair<string, string>("client_secret", client_secret));

            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Accept.Clear();
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

            FormUrlEncodedContent content = new FormUrlEncodedContent(postData);
            HttpResponseMessage response = await client.PostAsync("https://drchrono.com/o/token/", content);  

            if (response.IsSuccessStatusCode)
            {
                // Parse the response body. Blocking!
                var dataObject = response.Content.ReadAsStringAsync().Result;

                jsonReturn objjsonReturn = new JavaScriptSerializer().Deserialize<jsonReturn>(dataObject);

                //  var t = await getPatientList(objjsonReturn);
                //   ViewBag.Code = objjsonReturn.access_token;

                var accessToken = objjsonReturn.access_token;
                var refereshtoken = objjsonReturn.refresh_token;

            }
            else
            {
                Console.WriteLine("{0} ({1})", (int)response.StatusCode, response.ReasonPhrase);
            }

            return View();
        }




//when you click the "Call to Dr.Chrono" in HTML page. then you will be redirected to drchrono.com website for login
//Enter your login credentials over there, then another page will come where you need to click " Authorize" then it will redirect you to your defined application URL.
  
and you will get the authentication token ,refresh token and expiry date , store it in your database.
next time onwards you don't required above process. use your authentication token for accessing any API end point. only you required to refresh your token within 24 hrs.

code to refresh the token and update it in your database attached as txt file.

Please let me know you still you face the issue.

Regards
sunil Sharma













On Sun, Oct 16, 2016 at 1:01 AM, Steve Mirson <smi...@gmail.com> wrote:

Sunil,

 

I had the app already registered/created in their site, was ready to start digging into it. I also use C#, which they don’t support (judging by what they answered you) so your code sample can save me tons of grieve.

 

Thanks again!

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve.mirson@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchrono-api@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

 

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.

details I will send you tommorrow , I did in asp.net MVC C#.

 

Regards

Sunil

 

On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.


--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.
RefreshToken.txt

Steve Mirson

unread,
Oct 16, 2016, 12:10:49 AM10/16/16
to drchro...@googlegroups.com

Sunil,

 

Thank you so much for the code! Incredibly helpful! I’ll let you know as soon as I try it.

 

Thank you,

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 11:47 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hello Steve,

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

 

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.

details I will send you tommorrow , I did in asp.net MVC C#.

 

Regards

Sunil

 

On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.


--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

Erick Langford Xenes

unread,
Oct 17, 2016, 12:23:38 PM10/17/16
to drchro...@googlegroups.com
Mr Sunil explication is very clear.

This is what I did (using c# & MVC):

public ActionResult GetToken()
        {
            var request = (HttpWebRequest)WebRequest.Create("https://www.drchrono.com/o/token/");

            var code = Request.QueryString["code"];

            var postData = string.Format("code={0}&grant_type=authorization_code&client_id={1}&client_secret={2}&redirect_uri={3}", code, getClientId(), getClientSecret(), getRedirectUrl());

            var data = Encoding.ASCII.GetBytes(postData);

            request.Method = "POST";
            request.ContentType = "application/x-www-form-urlencoded";
            request.ContentLength = data.Length;

            using (var stream = request.GetRequestStream())
            {
                stream.Write(data, 0, data.Length);
            }

            var response = (HttpWebResponse)request.GetResponse();

            var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();

            var token = new JavaScriptSerializer().Deserialize<DrChronoDbToken>(responseString);

            saveToken(token);

            return View();

        }

also I use linq for store the token:

Imágenes integradas 1


if for example you need to get the doctors:

        public ActionResult GetDoctors()
        {
            string url = "https://drchrono.com/api/doctors";

            var token = getCurrentToken();//it returns the current token in the db

            HttpWebResponse response = null;

            string messageResponse;

            try
            {
                // Setup the Request

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

                request.Method = "GET";

                request.Headers["Authorization"] = string.Format("Bearer {0}", token.access_token);

                response = (HttpWebResponse)request.GetResponse();

                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                {

                    // Get the Response Stream

                    messageResponse = reader.ReadLine();

                }

            }

            catch (WebException e)
            {
                messageResponse = e.Message;
            }

            finally
            {
                if (response != null) { response.Close(); }

            }

            ViewBag.Message = messageResponse;

            return View();
        }
        

Hope someone else can use these examples :)


2016-10-15 23:10 GMT-05:00 Steve Mirson <smi...@gmail.com>:

Sunil,

 

Thank you so much for the code! Incredibly helpful! I’ll let you know as soon as I try it.

 

Thank you,

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve.mirson@nationalvision.com


 

 

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve.mirson@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchrono-api@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

 

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.

details I will send you tommorrow , I did in asp.net MVC C#.

 

Regards

Sunil

 

On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.


--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drchrono-api+unsubscribe@googlegroups.com.

Steve Mirson

unread,
Oct 17, 2016, 12:32:24 PM10/17/16
to drchro...@googlegroups.com

Eric,

 

Thanks for the help. The samples and your comments are huge time savers...

 

Thank you,

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Erick Langford Xenes
Sent: Monday, October 17, 2016 12:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Mr Sunil explication is very clear.

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

 

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.

details I will send you tommorrow , I did in asp.net MVC C#.

 

Regards

Sunil

 

On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.


--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

image001.png

Sunil Sharma

unread,
Oct 17, 2016, 2:34:35 PM10/17/16
to drchro...@googlegroups.com
Thanks! Erick, for sharing this code, it will save the time of developers.

Steve Mirson

unread,
Nov 6, 2016, 12:13:31 AM11/6/16
to drchro...@googlegroups.com

Eric, Sunil,

 

Thanks a lot guys! You made my life much easier with your samples. Got it all working!

 

Thank you,

 

Steve

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Monday, October 17, 2016 2:35 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Thanks! Erick, for sharing this code, it will save the time of developers.

 

Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


Steve Mirson | National Vision, Inc. | www.nationalvision.com | Systems Architect |  215.882.1374steve....@nationalvision.com


 

 

 

From: drchro...@googlegroups.com [mailto:drchro...@googlegroups.com] On Behalf Of Sunil Sharma
Sent: Saturday, October 15, 2016 3:24 PM
To: drchro...@googlegroups.com
Subject: Re: Fetching Data from Drchrono API and save in local database for Reporting

 

Hi Smirson,

 

For login and getting authentication token from drchrono api , you need to do the settings on drchronoapi website in API sections, where you need to provide the URL of your webapplication.

details I will send you tommorrow , I did in asp.net MVC C#.

 

Regards

Sunil

 

On Sat, Oct 15, 2016 at 9:27 AM, <smi...@gmail.com> wrote:

Sunil,

did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.


--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

image001.png

sk5...@nyu.edu

unread,
Nov 7, 2016, 1:50:31 PM11/7/16
to drchrono Medical Healthcare API SDK, erickl...@gmail.com
Hello Erick,
Hope you are doing well today!

I need some help with Drchrono API.
Can we connect today, at a time of your convenience.

On Friday, October 14, 2016 at 10:59:13 PM UTC-5, Erick Langford Xenes wrote:
> Sure, I think I can help you,  but I have the code at work.
>
>
>
> On Oct 14, 2016 10:57 PM, <smi...@gmail.com> wrote:
> Sunil,
>
>
>
> did you figure out how to log in? I'm facing the same issue, would appreciate help as it doesn't look like the DrChrono support really cares to make any of our lives easier. Can't believe there are no working samples of pretty much anything.
>
>
>
> --
>
> You received this message because you are subscribed to a topic in the Google Groups "drchrono Medical Healthcare API SDK" group.
>
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/drchrono-api/TMkMUcib2WU/unsubscribe.
>
> To unsubscribe from this group and all its topics, send an email to drchrono-api...@googlegroups.com.

Abhishek Mittal

unread,
Jul 27, 2020, 1:15:25 AM7/27/20
to DrChrono API Developers
Hello Sunil Sharma.
I am not able to get the auth token from drchrono api in C#. Can you please send me the login api code It will be helpful for me. 
Thank you 

Steve Mirson

unread,
Jul 27, 2020, 9:49:27 PM7/27/20
to DrChrono API Developers
Hey Abhishek - attaching my DrChrono authorization routine in C#. Strip the garbage, reuse the code you need.
drchrono-auth.txt

Steve Mirson

unread,
Jul 27, 2020, 9:51:35 PM7/27/20
to DrChrono API Developers
Added another function
drchrono-auth2.txt
Reply all
Reply to author
Forward
0 new messages