# Get Secret Key Example

> Example showing how to retrieve secret keys securely in API Maker applications.

Source: https://docs.apimaker.dev/v1/examples/sys/system/getSecret.html

`g.sys.system.getSecret` calls the [get secret system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-get-secret-by-name-api.html) from your code, whatever the settings of that API say about HTTP callers.

### Get secret System API

Get secret using global object 'g'.

- Get only one secret key value.

```typescript
await g.sys.system.getSecret("common.secret");
```

- Get multiple secret keys values.

```typescript
await g.sys.system.getSecret(["common.secret","common.secret"]);
```

## Related

- [Get secret system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-get-secret-by-name-api.html) · [All system APIs from code](https://docs.apimaker.dev/v1/examples/sys/system/system.html) · [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html)
