Moonbixs / core /token.py
yasir68's picture
Upload folder using huggingface_hub (#1)
7837518 verified
raw
history blame
557 Bytes
import requests
from orrnob_drops_automation import base
from core.headers import headers
def get_token(data, proxies=None):
url = "https://www.binance.com/bapi/growth/v1/friendly/growth-paas/third-party/access/accessToken"
payload = {"queryString": data, "socialType": "telegram"}
try:
response = requests.post(
url=url, headers=headers(), json=payload, proxies=proxies, timeout=20
)
data = response.json()
token = data["data"]["accessToken"]
return token
except:
return None