How to delete user on strapi v4 with GraphQL

1.1k views Asked by At

I don't know why but everytime I can't delete any user on graphQL playground, its always forbidden access. I checked "destroy" on setting >> role >> userpermission and put koen bearer but still didn't work, Here is what my code on playground,

mutation deleteUser {
deleteUsersPermissionsUser(id: "118") {
data {
  id
  attributes {
    username
    email
   }
  }
 }
}

here is the response:

{
  "errors": [
    {
      "message": "Forbidden access",
      "extensions": {
        "error": {
          "name": "ForbiddenError",
          "message": "Forbidden access",
          "details": {}
        },
        "code": "FORBIDDEN"
      }
    }
  ],
  "data": null
}
0

There are 0 answers