Create Users through API

Hi , I am trying to create Run users through API but not succesful.I followed instructions in documentation modules/RunUser/RunUser.ts:37 but I am getting the following error message
“status”: false,
“message”: “You don’t have permission to signup. Ask the owner to allow it.”

I use Account-Token for authorisation.
What am I doing wrong here?
Thanks in advance.

Hi @himansha,

In order to help you, I will ask for you to provide further information. As it can be very generic and it becomes difficult for me to help you.

Thanks.

Hi @guilhermeco

Thanks, I will try to explain. I need to create Run user through API
I send POST request to https://api.tago.io/run/mytagorunurl/signup
In the Header I use my account token for authentication.
When it reach the server I am getting 400 Bad Request error with the message “You don’t have permission to signup. Ask the owner to allow it.”
It seems I need to add some more authentication to it ,but not clear what I have to add

Thanks

@himansha you actually should do a:

POST request to → https://api.tago.io/run/users

Header paramters → account-token: “fill up with your account token”

Body request example:
{ "name": "string", "email": "string", "password": "string", "timezone": "string", "company": "string", "phone": "string", "language": "string", "tags": [ { "key": "string", "value": "string" } ], "active": true }

How to generate an account token?

image

HI @guilhermeco

Thanks ,Great support ,Yes It works fine . Can you also help with the URL and Header to Delete and Edit users as well . Is there any documentation on API for user management?

Sure,

DELETE request to →https://api.tago.io/run/users/{userID}

Header paramters →

account-token: “fill up with your account token”
userID: “fill up with userID”


PUT request to →https://api.tago.io/run/users/{userID}

Header paramters →

account-token: “fill up with your account token”
userID: “fill up with userID”

Body example →

{
  "name": "string",
  "email": "string",
  "timezone": "string",
  "company": "string",
  "phone": "string",
  "language": "string",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "active": true,
  "id": "string",
  "profile": "string",
  "newsletter": true,
  "last_login": "2021-03-17T12:11:07.950Z",
  "created_at": "2021-03-17T12:11:07.950Z",
  "updated_at": "2021-03-17T12:11:07.950Z",
  "options": {
    "additionalProp1": {}
  }

Thank you @guilhermeco for your support and providing clear examples. All work fine.