Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
442 B
1
Indexable
Never
params = {
        "user": {
            "email": "x0lig0n@gmail.com",
            "addfields": {"Тестовая дата": "10-10-2022"}
        },
        "system": {
            "refresh_if_exists": 1,
        }
    }

params_b64 = base64.b64encode(json.dumps(params).encode('utf-8'))

url = f'https://{account_name}.getcourse.ru/pl/api/users?action=add&key={key}&params={params_b64}'

r = requests.post(url)
print(r.text)