Hello everyone, We are using self hosted MedPlum ...
# general
r
Hello everyone, We are using self hosted MedPlum on AWS. And we are trying to create new user resource using bot. But we are getting the forbidden in the bot response. We've already enabled bot in the project. We are able to run other bots. So, can you give me a direction, how to enable user creation using bot or point me to the documentation. It will be helpful for us. I'm getting same error code in both lines const user = await medplum.searchOne('User',
email=${email}
); await medplum.createResource(userObject); Response i'm getting from the bot
Copy code
{
  "resourceType": "OperationOutcome",
  "id": "forbidden",
  "issue": [
    {
      "severity": "error",
      "code": "forbidden",
      "details": {
        "text": "Forbidden"
      }
    }
  ]
}
r
Hi Ravindra - users exist above the project level (they can be members of multiple projects) and so a bot scoped to a project does not have permissions to create them. You can create users in your Project settings though: https://app..com/admin/users Patients should be able to register as well if you have enabled open patient reg
s
Interesting thanks
c
If you do need to query for a
User
resource, make sure that the Bot is in the Super Admin project
n
Hello All, I am not able to execute the bot for the "User" resource is getting a "forbidden" error. I run the bot from Super Admin project
r
Do you mean the code in the Bot cannot create a user?
r
@reshma @cody @rahul1 Yes, when creating or searching user resources from the bot present in the Super Admin project. Specifically, we have been receiving a "Forbidden" response.
r
hey ravindra - let me DM you and let's see what is going on
475 Views