You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the FusionAuth documentation, there are two ways to remove a user from a group, and both use the URL to pass the request parameters to the FusionAuth API.
Either:
DELETE /api/group/member/{memberId}
or
DELETE /api/group/member?groupId={groupId}&userId={userId}
The method signature for deleteGroupMembers in this library seems designed to accept a JSON request body, but it is not clear how this body should be structured in order to remove a given user from a given group, since the documentation given above does not include removing users from a group using a request body.
The text was updated successfully, but these errors were encountered:
I agree that this isn't the clearest documentation. Sorry about that. The PHP client library doesn't support the two parameter based delete methods, but does support the request body based methods. These are documented here: https://fusionauth.io/docs/v1/tech/apis/groups/#request-body-4
If you know the user's membership id, you can delete it directly by building json like:
If you don't know the membership ids (which I believe is what you are looking for) but do know the group and the user id, you can also remove memberships in that way:
Note that there is an issue with the docs linked above, they have an extra array between the group id and the list of user ids, but I'll get that fixed.
According to the FusionAuth documentation, there are two ways to remove a user from a group, and both use the URL to pass the request parameters to the FusionAuth API.
Either:
DELETE /api/group/member/{memberId}
or
DELETE /api/group/member?groupId={groupId}&userId={userId}
The method signature for deleteGroupMembers in this library seems designed to accept a JSON request body, but it is not clear how this body should be structured in order to remove a given user from a given group, since the documentation given above does not include removing users from a group using a request body.
The text was updated successfully, but these errors were encountered: