> ## Documentation Index
> Fetch the complete documentation index at: https://docs.claimr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# User token: link your users' accounts to their claimr profiles

> Integrate user tokens to seamlessly track user progress within your campaigns without asking users to log in separately.

## Understanding user tokens

User tokens are like digital keys that link your users' accounts on your platform to their claimr profiles. This connection allows for a smoother, more personalized experience within your campaigns.

### How it works

Your users already have accounts on your platform — whether it's a mobile app, a website, or a crypto exchange. They've signed up, verified their identity, and are ready to engage with your claimr campaigns.

Instead of asking them to create another account or log in separately for claimr, user tokens let you seamlessly connect their existing account with their claimr activity.

### Behind the scenes

* Your application sends a special request to the claimr server to generate a unique token for each user.
* This token is then included in the claimr widget that you embed on your platform.
* When a user opens the widget, claimr uses the token to identify them and personalize their experience.

### Benefits of user tokens

* **No extra logins**: Users enjoy a frictionless experience without having to remember separate credentials.
* **Personalized content**: You can tailor the claimr experience to each user's preferences and progress.
* **Seamless cross-device experience**: Users can access their claimr profile and progress from any device, as long as they're logged in to your platform.

## Generate user token

To generate a user token, follow these steps:

### Initiate token request

Send a GET request to the `/token` endpoint from your server.

Include the following required parameters in your request:

* **Account**: A unique identifier for the user within your system (e.g., user ID, email address).
* **Platform**: A short name representing your organization or platform.
* **Authorization**: Include your organization's secret API token as a Bearer authorization header in the request. This authenticates your application's access to the token generation endpoint.

### Response

Upon successful request, a unique user token will be generated and returned in the response. This token is permanent and does not expire. You can store it securely to avoid repeated generation.

### Integrate user token with your application

Once you have generated the user token, you need to integrate it with your web or native application. This allows claimr to recognize and associate the authenticated user with their activities.

1. **Pass the token**: Transmit the generated user token from your server to your web or application.
2. **Set the token value**: For SDK integration with claimr, you have 2 options:
   * Via the `data-user-token` attribute in the embed script.
   * Using the SDK method with `window.claimr.set_user_token`.

For troubleshooting or support, reach our claimr support team or email us at [yo@claimr.io](mailto:yo@claimr.io).
