# JWT payload needs participantId?

**URL:** <https://forum.canton.network/t/jwt-payload-needs-participantid/4903>\
**Category:** App Development\
**Created:** [July 13, 2022, 1:36pm UTC](https://forum.canton.network/t/jwt-payload-needs-participantid/4903 "2022-07-13T13:36:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakub](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jakub](https://forum.canton.network/u/jakub)\
**Post date:** [July 13, 2022, 1:36pm UTC](https://forum.canton.network/t/jwt-payload-needs-participantid/4903/1 "2022-07-13T13:36:01Z")

</div>

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:

```haskell
{
  "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:

```haskell
    "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](https://daml.talentlms.com/unit/view/id:2131))) and I used the ui-template from here ([daml-ui-template/Report.tsx at 9c76c3548a65bd2603614e7760f460697d566dbf · digital-asset/daml-ui-template · GitHub](https://github.com/digital-asset/daml-ui-template/blob/9c76c3548a65bd2603614e7760f460697d566dbf/ui/src/pages/report/Report.tsx)).  
I’m using [jwt.io](http://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

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [July 14, 2022, 10:07pm UTC](https://forum.canton.network/t/jwt-payload-needs-participantid/4903/2 "2022-07-14T22:07:29Z")

</div>

Party IDs never look like `"Alice"` anymore in Daml 2.0. Search “party IDs” [in the release notes](https://blog.digitalasset.com/developers/release-notes/2.0.0) 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](https://docs.daml.com/2.2.0/app-dev/authorization.html#user-access-tokens) 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.
