Raul Garcia
Push
eb0b2fd
raw
history blame contribute delete
No virus
520 Bytes
import requests
import url64
from config import CONFIG
def get_id_cliente_reciclador(token: str) -> int | None:
try:
jwt = url64.decode(token) # (token + "==="), Refer to: https://gist.github.com/perrygeo/ee7c65bb1541ff6ac770
res = requests.post(CONFIG.AUTH_URL, json={ "authToken": jwt})
print("[AUTH] Status:", res.status_code)
if res.status_code == 200:
return res.json().get("idClienteReciclador", None)
except Exception as e:
print(e)
return None