How do you use the different tokens provided by DABL?

Hello, we have generated the service account credentials and we receive a jwt after login. However, when we try to use the token to access the v1/packages endpoint, we get the error message

"errors": [
        "the requested path: /v1/packages, requires right: Set(admin)"
    ],

What’s the difference between the received token and the token needed to make calls - what else needs to be done after receiving the jwt token via service account credentials.

Thank you

3 Likes

Split this into two separate threads, the second is here: Why do service accounts disappear from the DABL dashboard after refresh? :slight_smile:

1 Like

Hi again @Albert_Pul!

In DABL there are three types of tokens, tokens for users (“site tokens”), tokens for administering ledgers (“ledger admin tokens”), and tokens for using ledgers (“ledger access tokens”).

Service account tokens are of the third kind, and can therefore only be used to use ledgers. Unfortunately we don’t support programmatic access to v1/packages at this time, as we only support service account tokens of the “ledger access token” variety, though this could change in the future. Please use the console for those operations in the meantime.

1 Like

Thanks Max! I am able to use the retrieved service token to create contracts. The challenge now though is, I do not know how to retrieve party specific tokens. I tried creating the contract with a service token and then i indicated another party as the second signatory but that did not work. Say I have a party called Alice on my ledger, is there a way to retrieve a ledger admin token for Alice?
Thanks once again

1 Like

No problem :slight_smile:. Where before this was not supported, we did a push yesterday, 8/24, which adds this feature, so you should now be able to create a service account for a party that you control in the console. Kindly let me know if this works for you!

4 Likes