Files
Poseidon/scripts/get-barentswatch-token.sh
2023-12-12 18:44:12 +01:00

16 lines
364 B
Bash
Executable File

#!/bin/sh
if [ ! $# -eq 2 ]; then
echo "usage: client_id password"
exit 1
fi
client_id="$1"
password="$2"
curl -X POST \
--header "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=$client_id&scope=api&client_secret=$password&grant_type=client_credentials" \
https://id.barentswatch.no/connect/token
# vim: set filetype=bash: