... | ... | @@ -103,18 +103,16 @@ response = requests.post(f"{URL}/auth/getToken", json=data_auth) |
|
|
|
|
|
result = response.json()
|
|
|
token = result["token"] # Get the bearer token from the json
|
|
|
|
|
|
AUTH = {
|
|
|
"Authorization": f"Bearer {token}"
|
|
|
}
|
|
|
|
|
|
data_app = {
|
|
|
"name": "Demo app",
|
|
|
"type": "code"
|
|
|
}
|
|
|
|
|
|
headers = {
|
|
|
"Authorization": f"Bearer {token}"
|
|
|
}
|
|
|
|
|
|
response = requests.post(f"{URL}/app/create", json=data_app, headers=headers)
|
|
|
response = requests.post(f"{URL}/app/create", json=data_app, headers=AUTH)
|
|
|
|
|
|
result = response.json()
|
|
|
app_id = result["_id"] # Get the app id
|
... | ... | |