Send Friend Request with Python

I’m trying to make a simple python program that scans your current friends and if it notices that somebody unfriended you, it resends them a friend request. I’ve made a similar working prototype before a few years ago, but recently it seems the API has been having some issues.

Could somebody give me sample code on how to send a friend request to a user within python?

Hello! I am not familiar with the python programming language but here is the current friend request API that I was able to find.

POST Request
https://friends.roblox.com/v1/users/userid/request-friendship (make sure to replace “userid”)

Documentation for more information & testing
https://friends.roblox.com/docs/index.html