Client Token
A client token is a key embedded in web pages and mobile apps for sending data from users' devices to Datadog. That its value is visible in the HTML source is how it is meant to be used, and in exchange you avoid exposing the API key, which belongs on the server, to devices.
Overview
Because it is written into a web page's JavaScript or inside a mobile app, anyone who opens the page source can read the value. Knowing why the API key still cannot be placed on the screen side, and how this key works in its place, keeps you from panicking when you see the value in HTML. The differences from the API key also show up in what happens when the person who created it leaves and whether it can be restored after deletion. It is the concept to keep in mind when you start RUM or browser log collection, when you decide how to handle keys created by people who have left, and when you are unsure whether to delete a key.
A key that exists because the API key cannot be placed on the screen side
API keys cannot be used for sending from browser, mobile, or TV apps. This is because the value would be visible on the user's device, and such apps send to Datadog with a client token instead (as of October 2026; Source: API and Application Keys). Examples of where it is used are log collection for browser, Android, iOS, React Native, Flutter, and Roku, and RUM applications that send events and logs. A comparison of the three kinds of keys, alongside API keys and application keys, is summarized in a table in the explanation in API Key. The issue specific to client tokens alone is how to hold a key that is assumed to be seen.
What a key assumed to be seen is protecting
In browser RUM, creating an application issues a clientToken and an applicationId. You write both of them in the initialization code (as of October 2026; Source: Browser Monitoring Client-Side Setup). In other words, the token's value goes as is into the JavaScript you distribute. Every use listed in the official documentation is a job on the side of sending data from devices to Datadog. The aim of using this key is to avoid exposing to devices the API key and application key that belong on the server side; it is not a mechanism for hiding the token's value itself. Tokens are unique to each organization, and you create and manage them in the Client Tokens tab of the organization settings. How to build in the SDK is left to the article on the RUM Browser SDK.
A key that remains after a person leaves, and SCIM
The property of remaining even when its creator is disabled and of being impossible to restore once deleted is laid out alongside the three kinds of keys in the table in the explanation in API Key. When a user is disabled, that person's application keys are revoked, so even in the same situation of "a person leaving", the outcome is the opposite depending on the key. Even in organizations that automate disabling people with SCIM, the tokens stay in place without anyone touching them. Even if offboarding runs automatically, assume that taking inventory of client tokens remains as a separate task.
When replacing a token, create first and delete later
If you swap the value, create the new token first, and delete the old token last.
- In the Client Tokens tab of the organization settings, press New Client Token, give it a name, and create it
- Change
clientTokenin the initialization code to the new value and distribute it - Once the version with the new value has spread, delete the old token with Delete in the list
In the Android SDK as well, you write clientToken in the configuration built at app startup (Configuration.Builder) (as of October 2026; Source: Android and Android TV Monitoring Setup). For web pages, redistributing is enough, but where things cannot be swapped after distribution, as with mobile apps, old versions remain on users' devices. One way to proceed is to follow the order of deleting the old token only after confirming that the version containing the new token has spread. A deleted token cannot be restored, so place Delete as the last step (as of October 2026; Source: API and Application Keys).
Find tokens with unknown owners in the list
When you create a token, you give it a name (as of October 2026; Source: API and Application Keys). If you create a separate token for each app and put the app and environment in the name, you can read from the name which app will be affected when you delete it. When thinking about how to hold keys not tied to a person, the explanation in Service Account is also helpful. In the Client Tokens tab of the organization settings, look for tokens whose use cannot be told from their names. When you find one, before deleting it, track down where that value is used in the RUM or log senders, and add its use to the name.