Huge refactoring
This commit is contained in:
12
util_scripts/gigachat_get_token.sh
Executable file
12
util_scripts/gigachat_get_token.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#/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
|
||||
Reference in New Issue
Block a user