16 lines
364 B
Bash
Executable File
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: |