Authentication via C# Winforms application

Hi,

I'm currently attempting to authenticate via a C# Winforms application and am struggling to figure out how to do so. I am following the document here:

developer.sage.com/.../

Is there a sample somewhere demonstrating how to do this from a desktop application?

Parents
  • Hi Brandon,

    the documentation about authentication that you've linked is currently the only detailed document about it. As we are constantly improving the documentation, there might be updates in the future. 

    To authenticate a Windows application, you need to have a web view to open the Auth Page of Sage Accounting (see Authentication Request in the documentation). You need to take all query params from the redirect URL call to get your first token (explained in Exchange the authorization code for the access token).

    I hope that this might help you somehow. 

  • Hi, I tried to get "Code", as mentioned in this document, but not success. Please help me.

    using (var wb = new WebClient())
    {
    var data = new NameValueCollection();
    data["username"] = userName;
    data["password"] = password;
    wb.UseDefaultCredentials = true;
    var response13 = wb.UploadValues(URL, "POST", data);
    string responseInString = Encoding.UTF8.GetString(response13);
    }

Reply
  • Hi, I tried to get "Code", as mentioned in this document, but not success. Please help me.

    using (var wb = new WebClient())
    {
    var data = new NameValueCollection();
    data["username"] = userName;
    data["password"] = password;
    wb.UseDefaultCredentials = true;
    var response13 = wb.UploadValues(URL, "POST", data);
    string responseInString = Encoding.UTF8.GetString(response13);
    }

Children