API로 새 사용자 만들기

여러분 안녕하세요. 최근, 글에서 사용자를 언급할 때 사용자를 태그하기 위해 API를 통해 가상의 사용자(fake users)를 생성하는 아이디어를 떠올렸습니다. 이 가상 사용자들은 제가 독자들에게 소개하고 싶은 저자에 대한 소개 정보를 포함하여 초기화됩니다.

현재 Discourse API Docs 의 Discourse 문서를 참고하고 있으며, Postman 앱에서 테스트를 진행했습니다.

제 절차는 다음과 같습니다.

  1. User Level은 Single User, Scope는 Global로 설정
  2. Auth Type을 "API key"로 설정
    • Key:… API Key
    • Value: none
  3. Body를 raw/json으로 설정
{
  "name": "name",
  "email": "email",
  "password": "pass",
  "username": "username",
  "active": true,
  "approved": true,
  "user_fields[1]": true,
  "external_ids": {}
}

그 결과 Response 200을 받았지만, 제 이메일을 확인해 보았을 때 이메일이 오지 않았으며, 시스템이 사용자가 생성되었다는 확인 메시지도 없습니다.

{
    "success": true,
    "active": false,
    "message": "<p>You’re almost done! We sent an activation mail to <b>email</b>. Please follow the instructions in the mail to activate your account.</p><p>If it doesn’t arrive, check your spam folder.</p>"
}

이 작업을 수행해 본 경험이 있는 분이 계시다면 도움을 주시면 감사하겠습니다.