# Custom headers
The Trusted Twin platform allows you to use optional custom HTTP headers in requests to the Trusted Twin API.
DICT rule variable in the request header follows the standard object description structure. The
DICT variable must be encoded to be passed safely within the header.
If you are using the Trusted Twin official Python library, you only need to provide the
tt_dict as a dictionary:
In case you need to generate the value, you can use the Python function below:
For other programming languages, use the same technique consisting of the following steps:
DICTinto its JSON representation encoded in UTF-8,
- encode the string using base64 standard encoding.
Let's assume you want to pass the following dictionary in the header:
After encoding, the header will look as follows:
# Example usage scenario
To explore example scenario of
X-TrustedTwin header usage, please go to Custom headers guide.