Update get_apps.py

This commit is contained in:
Julimiro 2024-08-19 05:56:39 -04:00
parent 325fe0d80e
commit 9fc70acb4d

View file

@ -1,31 +1,29 @@
import os
import requests
from dotenv import load_dotenv, dotenv_values
load_dotenv()
baseurl = '' # replace with your actual URL
path = "/app/create"
url = os.getenv("baseurl")+path
data = {
"name": "test",
"description": "test",
"permission":
["read:drive","write:drive","write:messaging","write:notes"],
"callbackUrl": "http://example.com"
}
# Define the headers, including the bearer token for authorization
headers = {
'Authorization': f'Bearer {os.getenv("api_key")}', # replace YOUR_ACCESS_TOKEN with your actual token
'Content-Type': 'application/json'
}
# Send the POST request
response = requests.post(url, json=data, headers=headers)
# Print the response (optional)
print(response.status_code)
import os
import requests
from dotenv import load_dotenv, dotenv_values
load_dotenv()
path = "/app/create"
url = os.getenv("baseurl")+path
data = {
"name": "imagebot",
"description": "imagebot <https://git.gay/Julimiro/imagebot/>",
"permission":
["read:drive","write:drive","write:messaging","write:notes"],
"callbackUrl": "http://example.com"
}
# Define the headers, including the bearer token for authorization
headers = {
'Authorization': f'Bearer {os.getenv("api_key")}', # replace YOUR_ACCESS_TOKEN with your actual token
'Content-Type': 'application/json'
}
# Send the POST request
response = requests.post(url, json=data, headers=headers)
# Print the response (optional)
print(response.status_code)
print(response.json())