shahu-acc-balance/get-balance.sh

19 lines
439 B
Bash
Raw Normal View History

2022-11-16 22:46:27 +05:00
#!/bin/bash
#Import variable
source .env
#Login
$curl -s -c $COOKIE $BML_URL/login \
--data-raw username=$BML_USERNAME \
--data-raw password=${BML_PASSWORD}
# Get profiles and select personal profile
PROFILE=$($curl -s -b $COOKIE $BML_URL/profile | jq -r '.payload | .profile | .[] | .profile' | head -n 1)
$curl -s -b $COOKIE $BML_URL/profile \
--data-raw profile=$PROFILE >> /dev/null
$curl -s -c $COOKIE $BML_URL/api/dashboard