12 lines
409 B
Bash
Executable File
12 lines
409 B
Bash
Executable File
#/usr/bin/bash
|
|
|
|
if [ -n "$GIGA_SECRET" ]; then
|
|
curl -k -L -X POST 'https://ngw.devices.sberbank.ru:9443/api/v2/oauth' \
|
|
-H 'Content-Type: application/x-www-form-urlencoded' \
|
|
-H 'Accept: application/json' \
|
|
-H "RqUID: $(uuidgen)" \
|
|
-H "Authorization: Bearer $GIGA_SECRET" \
|
|
--data-urlencode 'scope=GIGACHAT_API_PERS'
|
|
else
|
|
echo "Please set GIGA_SECRET envvar"
|
|
fi |