Create a ticket
Sign in Sign up
Locker support Locker support
Results

No results found.

Home Locker Secrets Manager Developer tools Secrets - SDK .Net Usages Set up the access key
Vietnamese English
Set up the access key

Set up the access key

The SDK needs to be configured with your access key which is available in your Locker Secrets Dashboard. Initialize the access_key_id and secret_access_key to its value. You also need to set api_base value (default is https://secrets-core.locker.io).

If you need to set your custom headers, you also need to set headers value in the options param:

using Locker;


string accessKeyId = "YOUR_ACCESS_KEY_ID";
string secretAccessKey = "YOUR_SECRET_ACCESS_KEY";
string apiBase = "YOUR_API_BASE";
Dictionary<string, string> headers = new Dictionary<string, string>()
{
    { "CF-Access-Client-Id", "YOUR_CF_ACCESS_CLIENT_ID" },
    { "CF-Access-Client-Secret", "YOUR_CF_ACCESS_CLIENT_SECRET" }
};
LockerConfiguration.Instance.Init(
    accessKeyId: accessKeyId,
    secretAccessKey: secretAccessKey,
    apiBase: apiBase,
    headers: headers
);

// setting by .env file
LockerConfiguration.Instance.Init(
    envPath: "YOUR_ENV_FILE_PATH"
																																																																																																	);
Was this page helpful?
No
Yes
Join Our Community