# Storing and retrieving a secret API key in a server build?

**URL:** <https://forums.unrealengine.com/t/storing-and-retrieving-a-secret-api-key-in-a-server-build/428461>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, dedicated-server, unreal-engine, Multiplayer, UE4, Blueprint, question\
**Created:** [July 1, 2018, 9:50am UTC](https://forums.unrealengine.com/t/storing-and-retrieving-a-secret-api-key-in-a-server-build/428461 "2018-07-01T09:50:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [July 1, 2018, 9:50pm UTC](https://forums.unrealengine.com/t/storing-and-retrieving-a-secret-api-key-in-a-server-build/428461/2 "2018-07-01T21:50:05Z")

</div>

Use INI files and don’t replicate, make sure it runs on server and only server engine ini has it (don’t place key in default config)

Use of INI files is very limited in blueprint, but at least you can read variable from it. You can click variable and extend property tab, there should be Config Variable Checkbox, this will make engine grab default value from INI file on object creation. The INI location where this variable will be loaded from is printed out on tooltip when you hover over the config checkbox. The variable name in INI should be the same as in the blueprint, im not 100% the bool variable might require “b” prefix, also don’t make variables name with spaces.

Thats all you can do with INIs in blueprint (without any plugins) for more you need to dive in to C++:

> **[Configuration Files](https://docs.unrealengine.com/5.1/en-US/configuration-files-in-unreal-engine/)**
>
> Text files containing property settings for configuring gameplay or engine behavior.

^^^^ it will work the same as in blueprint but in C++ you can call LoadConfig() and SaveConfig() on object with config varbales to load and save those variable states from/to INI anytime. You can also more directly edit INI files:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

All GConfig functions:

> **[FConfigCacheIni](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/Misc/FConfigCacheIni/)**
>
> Set of all cached config files.

---

_[View the full topic](https://forums.unrealengine.com/t/storing-and-retrieving-a-secret-api-key-in-a-server-build/428461)._
