JWT payload needs participantId?

Hi!

I want to use Postman to get read data from my Ledger. In every topic and even documentation, JWT coded payload sholud be looks like this:

{
  "https://daml.com/ledger-api": {
    "ledgerId": "sandbox",
    "applicationId": "foobar",
    "actAs": ["Alice"]
  }
}

I don’t know why have I to provide participantId in “actAs” line, like this:

    "actAs": ["Alice::121354861534864231684321"]

Everything works fine with this, but it’s make more problems when I’m trying build JWT Token in front-end via React.
I use my own application and I followed Levente Barczy video from Introduction to Daml (episode 5 - (Daml Training Platform)) and I used the ui-template from here (daml-ui-template/Report.tsx at 9c76c3548a65bd2603614e7760f460697d566dbf · digital-asset/daml-ui-template · GitHub).
I’m using jwt.io to generate tokens.

I know that front-end works with back-end, because if I hardcoded participantId in “createToken” function, everything works fine.
I have 2 ways, but I don’t know which is correct and possible:
1 - creating token doesn’t require participantId
2 - somehow read participantId with every ledger start and add it to payload.

Could you tell me, what I’m doing wrong?

Edit: on version 1.18.3 everything works with simply “actAs: [“Alice”]”. Problem is on sdk version 2.2.0

Party IDs never look like "Alice" anymore in Daml 2.0. Search “party IDs” in the release notes for a summary.

Additionally, please note that this form of JWT token is deprecated in Daml 2.0, in favor of the more standardized user access token format. This allows you to manage your actAs and readAs, along with other access control features, directly over the ledger or JSON API.

There’s much more documentation at that link, and you can also take a look in the create-daml-app template created by your daml command to see how it sets up and works with user management.