Hello,
can someone help me to import this python script to B4J each try i have done ends in an internal server error or i don't get the token. and i have to say that i'm not a python programmer.
thanks for your advice
Andy
can someone help me to import this python script to B4J each try i have done ends in an internal server error or i don't get the token. and i have to say that i'm not a python programmer.
Python:
#!/usr/bin/env python3
import sys
import requests
import json
rBody = {'userName': 'guest@qubic.li', 'password': 'guest13@Qubic.li', 'twoFactorCode': ''}
rHeaders = {'Accept': 'application/json', 'Content-Type': 'application/json-patch+json'}
r = requests.post('https://api.qubic.li/Auth/Login', data=json.dumps(rBody), headers=rHeaders)
token = r.json()['token']
print(token)
thanks for your advice
Andy
Last edited: