Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ACCESS_TOKEN=$(curl -s -f -X POST -u $CLIENT_ID:$CLIENT_SECRET -d "grant_type=password&username=$USERNAME&password=$PASSWORD&scope=openid email userInfo roles" $opuscapitaHost/auth/token | jq --raw-output ".access_token")
echo $ACCESS_TOKEN

Calling Endpoint

having ACCESS_TOKEN you need to form and send Bearer Authentication header with each of you target api request

AUTH_HEADER="Authorization: Bearer $ACCESS_TOKEN"
echo $AUTH_HEADER

...

body='{"filter": {}}'

curl -X POST -H "$AUTH_HEADER" -H "content-type:application/json" -d "$body" "$opuscapitaHost/track/api/transactions"

...