Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
•
4c98104
1
Parent(s):
291232b
API test
Browse files
utils.py
CHANGED
@@ -5,7 +5,7 @@ from datetime import datetime, timedelta
|
|
5 |
|
6 |
|
7 |
def gen_auth_token(auth_file):
|
8 |
-
|
9 |
url = "https://ngw.devices.sberbank.ru:9443/api/v2/oauth"
|
10 |
|
11 |
payload='scope=GIGACHAT_API_CORP'
|
@@ -15,6 +15,8 @@ def gen_auth_token(auth_file):
|
|
15 |
'RqUID': '1b519047-0ee9-4b63-8599-e5ffc9c77e72',
|
16 |
'Authorization': os.getenv('GIGACHAT_API_TOKEN')
|
17 |
}
|
|
|
|
|
18 |
|
19 |
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
|
20 |
|
|
|
5 |
|
6 |
|
7 |
def gen_auth_token(auth_file):
|
8 |
+
|
9 |
url = "https://ngw.devices.sberbank.ru:9443/api/v2/oauth"
|
10 |
|
11 |
payload='scope=GIGACHAT_API_CORP'
|
|
|
15 |
'RqUID': '1b519047-0ee9-4b63-8599-e5ffc9c77e72',
|
16 |
'Authorization': os.getenv('GIGACHAT_API_TOKEN')
|
17 |
}
|
18 |
+
|
19 |
+
print(headers)
|
20 |
|
21 |
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
|
22 |
|