Show all your accounts

Endpoint

GET /api/Account/GetAllConnectedAccount

Response

NameTypeAdditional information
AccountListObject array

Example Request

public async Task<object> GetAllConnectedAccount(string access_token)
        {
            using (var client = new HttpClient())
            {
                try
                {
                    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

                    client.DefaultRequestHeaders.Authorization =
                      new AuthenticationHeaderValue("Bearer", access_token);

                    var url =  root + "/api/Account/GetAllConnectedAccount";
                    HttpResponseMessage response = await client.GetAsync(url);

                    if (response.IsSuccessStatusCode)
                    {
                        string result = await response.Content.ReadAsStringAsync();
                        JArray jsonArray = JArray.Parse(result);
                        return jsonArray;

                    }
                    else return response.StatusCode;
                }
                catch (Exception e)
                {
                    return "Exception: " + e.Message;
                }
            }
        }

Example Response

[
    {
        "AccountId": "a5aec89d-111-41c8-bc24-afe29bbe8db6",
        "CompanyName": "dfdf",
        "IsSelected": true
    },
    {
        "AccountId": "95d65dcf-1111-4878-8f70-90ddb00fea12",
        "CompanyName": "test",
        "IsSelected": false
    },
    {
        "AccountId": "9f2d6b87-1111-4cbb-8b00-2e141b59a528",
        "CompanyName": "newtest",
        "IsSelected": false
    },
    {
        "AccountId": "9787f249-1111-49a8-9e57-0842624e2713",
        "CompanyName": "dsf",
        "IsSelected": false
    },
    {
        "AccountId": "8d3f6b1b-1111-49e7-89ae-038f1a72c5a9",
        "CompanyName": "mmmnew",
        "IsSelected": false
    }
]