Anonymize user - blank response from API on attempt?


(Frank Bailey) #1

Hi folks, I’m trying to hit the endpoint to anonymize a user in Discourse; I’ve got single sign-on between WordPress and Discourse set up, and when the user deletes their account on WordPress I want to anonymize them in Discourse. The endpoint is

/admin/users/{id}/anonymize:
put:
  description: |
    Anonymize a user
  tags:
    - Admin
  parameters:
    - name: id
      in: path
      required: true
      type: integer
  responses:
    '200':
      description: succesfully anonymized user
      schema:
        type: object
        properties:
          success:
            type: string
          username:
type: "string"

When I hit that endpoint with a PUT and a valid user ID, API key and username etc., I get no response. Blank page. I’m guessing I should definitely get some kind of response, so has this endpoint perhaps been removed or renamed in some way?


(Frank Bailey) #2

Nobody has any idea on this one?


(Michael - DiscourseHosting.com) #3

No, the endpoint is not removed or renamed, and yes you should get the username back in json:

What HTTP response code are you getting?


(Frank Bailey) #4

Hi Michael. I’m an idiot. I was trying to hit http:// when the forum is set to https://

IDIOT IDIOT IDIOT

Thanks for trying to help.


(Sam Saffron) #5

Don’t feel that bad about it, we all make mitsakes sometimes.


(Joshua Rosenfeld) #6

This topic was automatically closed after 32 hours. New replies are no longer allowed.