Group accept join request api(link):
https://groups.roblox.com/docs#!/Membership/post_v1_groups_groupId_join_requests_users_userId
Group kick api(link):
https://groups.roblox.com/docs#!/Membership/delete_v1_groups_groupId_users_userId
if you check each api, you’ll see that they share the same api link and the only difference between them would be the request method(group accept - POST, group kick - DELETE)
A part of my program’s code for accepting a user into the group:
r = req.post(f"https://groups.roblox.com/v1/groups/{groupid}/join-requests/users/{targetrobloxid}", headers={"X-CSRF-TOKEN": xcrsftoken}).json()
This actually works well flawlessly.
However this, a piece of code intended to kick a user from a group:
r = req.delete(f"https://groups.roblox.com/v1/groups/{groupid}/users/{targetrobloxid}", headers={"X-CSRF-TOKEN": xcrsftoken}).json()
it only ends up with an error:
{'errors': [{'code': 3, 'message': 'The user is invalid or does not exist.', 'userFacingMessage': 'The user is invalid or does not exist.'}]}
Now I can assure you that the same variable among these 2 lines of code share the same value and the user was indeed in the group when I tried to kick.
Can anyone tell me what I’m doing wrong here?