--- title: "Generating the JWT Access Token" slug: "generating" updated: 2026-11-17T04:29:40Z published: 2026-11-17T04:29:40Z canonical: "usercentrics.com/generating" --- > ## Documentation Index > Fetch the complete documentation index at: https://usercentrics.com/docs/llms.txt > Use this file to discover all available pages before exploring further. # Generating the JWT Access Token To ensure secure access and personalized data submission and display, a JWT token is generated that contains essential information, like ConfigurationID and UserID. To obtain a JWT token, execute a direct call to the dedicated API endpoint `/authenticate`, providing the following parameters: - **UserID:** A unique identifier owned by the customer, such as an email address, login, or a set of symbols, ensuring uniqueness. - **PacUuid:** The Configuration ID for which access is requested. - **UserPublicName:** An optional parameter for displaying a human-readable username in the Preference app, useful when the UserID is not human-readable. - **userEmail:** An optional parameter to support transactional emails for the users, that do not use email as UserID (i.e. in case of Double-opt-In) The **ConfigurationID** can be found in Admin Interface on the page with the list of Configurations or when viewing the structure of specific Widget: | ![Configurations list](https://cdn.document360.io/17f91ed2-e9be-4746-9f2b-1fa43f97e9b5/Images/Documentation/pm-api-2.png?sv=2026-02-06&spr=https&st=2026-11-19T07%3A47%3A06Z&se=2026-11-19T08%3A47%3A06Z&sr=b&sp=r&sig=d2ig9q80HryrYWgUVVrQaLp4CoZNs4poMP1O3oT8kUQ%3D) | | --- | | *Configurations list* | | ![Widget structure view displaying identifiers of all key elements: Configuration, Widget, Topics, and Options](https://cdn.document360.io/17f91ed2-e9be-4746-9f2b-1fa43f97e9b5/Images/Documentation/pm-api-3.png?sv=2026-02-06&spr=https&st=2026-11-19T07%3A47%3A06Z&se=2026-11-19T08%3A47%3A06Z&sr=b&sp=r&sig=iN1itgcCUGG4PcTeS7qHz2ZPBO31xJW8A4o9sumCI84%3D) | | --- | | *Widget structure view displaying identifiers of all key elements: Configuration, Widget, Topics, and Options* | **Example:** ```plaintext curl -X POST \  'https://preference-api.preference-management.usercentrics.eu/public/authenticate' \  -H 'accept: application/json' \  -H 'X-API-KEY: 7b931a0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa0d1' \  -H 'Content-Type: application/json' \  -d '{    "pacUuid": "1234abcd-22bb-33cc-44dd-12345678abcd",    "userId": "user@company.com",    "userPublicName": "Test User",    "userEmail": "user@email.com"  }' ``` **Response:** If the call is successful, it will return the token, which should be included as the Authorization header (format = Bearer {{token}}) in subsequent calls to the platform API. ```plaintext {  "token": "eyJhbG...erJY" } ``` Please note, **the token is valid a period of 8 hours**, so it can be reused during the session without the need to request a new one. > [!NOTE] > It is strongly recommended to perform such a call on a backend, since the API Key is sensitive information and can be used to access the whole set of preference data the Key owner has access to. > [!NOTE] > For full reference to the endpoints and their parameters, responses, and error codes returned, check our Swagger documentation: [https://preference-api.preference-management.usercentrics.eu/public-api-doc#/Authentication/PublicApiController_authenticate](https://preference-api.preference-management.usercentrics.eu/public-api-doc#/Authentication/PublicApiController_authenticate)