Build | |
.Net Client |
You'll need to talk to the ESFA
var tokenServiceConfig = new TokenServiceApiClientConfiguration
{
ClientSecret = "<something>",
ApiBaseUrl = "https://sfa-token-api/",
ClientId = "<client-guid>",
IdentifierUri = "<url service identifier for AD>",
Tenant = "<SFA Azure AD>",
TokenCertificate = null // used in prod
};
var tokenService = new SFA.DAS.TokenService.Api.Client.TokenServiceApiClient(tokenServiceConfig);
var tokenResult = await tokenService.GetPrivilegedAccessTokenAsync();
var httpClient = HmrcLevyApiClient.CreateHttpClient(tokenResult.AccessCode, "https://hmrc-api-url/");
var client = new HmrcLevyApiClient(httpClient);
var result = await _sut.GetEmployerLevyDeclarations("000/000000");