Skip to content

Instantly share code, notes, and snippets.

@saltz
saltz / IngSandBoxApiAuth.cs
Last active April 8, 2020 22:38
ING OpenAPI sandbox authentication
/// <summary>
/// Both example certificates and key pairs have been converted to the (PKCS#12 or PFX) standard.
/// This simplifies the process of accessing the private keys and integrating them with the HttpClient.
/// This process can be done using the following openssl command: `openssl pkcs12 -export -out certificate.p12 -inkey privateKey.key -in certificate.crt`
/// </summary>
public async Task IngApiGetToken()
{
const string clientId = "e77d776b-90af-4684-bebc-521e5b2614dd";
HttpMethod method = HttpMethod.Post;
const string hostUrl = "https://api.sandbox.ing.com";