camunda-community-hub/camunda-8-sdk-node-js

Task list api in self hosted version

Closed this issue · 1 comments

Hi,

I am trying to call the get task list api for the self managed version.
It is giving the error:

/Users/work/Documents/practice/workflow-engine/camunda-ts/node_modules/.pnpm/camunda-8-credentials-from-env@1.2.2/node_modules/camunda-8-credentials-from-env/dist/index.js:50 throw new Error(Credentials do not have required scope 'Tasklist'. Credential scopes: '${tasklistCache.CAMUNDA_CREDENTIALS_SCOPES}'`);
^

Error: Credentials do not have required scope 'Tasklist'. Credential scopes: 'undefined'
at getTasklistCredentials (/Users/work/Documents/practice/workflow-engine/camunda-ts/node_modules/.pnpm/camunda-8-credentials-from-env@1.2.2/node_modules/camunda-8-credentials-from-env/dist/index.js:50:15)
at new TasklistApiClient (/Users/work/Documents/practice/workflow-engine/camunda-ts/node_modules/.pnpm/camunda-tasklist-client@0.9.5/node_modules/camunda-tasklist-client/dist/lib/TasklistApiClient.js:56:83)
at Object. (/Users/work/Documents/practice/workflow-engine/camunda-ts/dist/app.js:29:18)
at Module._compile (node:internal/modules/cjs/loader:1375:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49
`

But,
For the self managed version, we are not getting those information. Or where can we find these details
https://forum.camunda.io/t/how-to-obtain-zeebe-cluster-details/37197

This is what a set of environment variables for self-hosted looks like:

export ZEEBE_SECURE_CONNECTION=false
export ZEEBE_ADDRESS='localhost:26500'
export ZEEBE_CLIENT_ID='zeebe'
export ZEEBE_CLIENT_SECRET='zecret'
export ZEEBE_AUTHORIZATION_SERVER_URL='http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token'
export ZEEBE_TOKEN_AUDIENCE='zeebe.camunda.io'
export CAMUNDA_CREDENTIALS_SCOPES='Zeebe,Tasklist,Operate'
export CAMUNDA_OAUTH_URL='http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token'

Please modify with the values for your network and client secrets and try that.