> For the complete documentation index, see [llms.txt](https://dynamicpixels.gitbook.io/dynamicpixels-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dynamicpixels.gitbook.io/dynamicpixels-docs/more/trusted-server.md).

# Trusted Server

<figure><img src="https://images.unsplash.com/photo-1663932210347-164a05ed0ccd?crop=entropy&#x26;cs=srgb&#x26;fm=jpg&#x26;ixid=M3wxOTcwMjR8MHwxfHNlYXJjaHw5fHx0cnVzdGVkJTIwc2VydmVyfGVufDB8fHx8MTc0NzI1NzE2M3ww&#x26;ixlib=rb-4.1.0&#x26;q=85" alt=""><figcaption></figcaption></figure>

Some operations in your game — like managing sensitive player data, processing rewards, or validating in-game purchases — are best handled server-side for maximum security.

To support this, **DynamicPixels** allows you to register one or more **Trusted Servers** that can securely interact with our platform via a **server token**.

> 🚨 Only registered trusted servers can perform certain privileged actions through our API.

### What is a Trusted Server?

A *Trusted Server* is any backend you control (e.g., a Node.js, Python, Go, or C# server) that communicates directly with the DynamicPixels API using a **long-lived, secure server token**. This ensures your game logic stays tamper-proof and only your verified infrastructure can modify critical data.

{% embed url="<https://www.youtube.com/watch?v=Qumq-fUkEMM>" %}

### Use Cases

You should use a Trusted Server when:

* Awarding premium currency or items
* Modifying secure player data
* Validating payments or anti-cheat logic
* Running scheduled tasks (cron jobs) that interact with the platform

### Security Best Practices

* **Never expose** your server token in client-side code (JavaScript, Unity C#, etc.)
* Store the token in secure server-side environments (e.g., `.env` or secret manager)
* Rotate your token if it has been compromised
* Use **rate limiting** and request logging on your server for added security
