使用Python上传头像(Discourse API)

太棒了!我弄明白了第二步!

url = "https://<my_site>/users/<username>/preferences/avatar/pick.json"

data={
"upload_id": '<id_from_the_1st_step>',
"type":  'uploaded'
}

response = requests.request("PUT", url, headers=headers, data=data)

爱了爱了!:heart:

1 个赞