Discord API v10 Bio changer

Issue

This Content is from Stack Overflow. Question asked by NikitosPy

Here is my part of code

 bio = 'Changing bio omg... '
 r = requests.patch(url="https://discord.com/api/v10/users/@me", 
                   headers= {"Authorization": f'Bot {token}',
                            "Content-Type": "application/json",}, 
                   json =json.dumps({" bio": bio))
print(r.content) 

But I get:

b'{"code": 50035, "errors": {"_errors": [{"code": "DICT_TYPE_CONVERT", "message": "Only dictionaries may be used in a DictType"}]}, "message": "Invalid Form Body"}'



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?