Daml start, daml.yaml init script and authorization

Hello Daml Forum,

I use “daml start” to start my application.

I have a daml.yaml (sdk-version: 1.17.1) with a sandbox auth. option (ex: sandbox-options: - --auth-jwt-hs256-unsafe=…) and an init-script (init-script: …).

The problem is the init script fails with an obvious UNAUTHENTICATED error as “daml start” does not add the --access-token-file option when calling the init script.

Is there a way to add this option to the daml.yaml? I couldn’t find anything in the documentation.

Thank you in advance

You can specify script-options in your daml.yaml file which will be passed to daml script when daml start executes your init script. So for your problem, add something like this to your daml.yaml:

  - --access-token-file=path/to/yourtokenfile