add simple script to fetch barentwatch token

This commit is contained in:
Simen Kirkvik
2023-12-12 18:24:21 +01:00
parent 0706da3499
commit ad5849fb93

View File

@@ -0,0 +1,16 @@
#!/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: