Loading ...

Add User Api | Communifire Support

Communifire Support

Leave Space :

Are you sure you want to leave this space?

Join this space:

Join this space?

Add a new tab

Add a hyperlink to the space navigation. You can link to internal or external web pages. Enter the Tab name and Tab URL. Upload or choose an icon. Then click Save.

The name that will appear in the space navigation.
The url can point to an internal or external web page.
Login to follow, share, and participate in this space.
Don’t have a support community login?Create your account now
  • DanMirandaITx

    Hello,

    When I create a user with the following json:

    {"Username":"unittestuser2","FirstName":"UnitTest2","LastName":"User2","Email":"UnitTestUser2@testdomain.com","HireDate":"10/10/1990","Occupation":"Sr. Dummy User","ReportsTo":"","BranchDeptName":"Information Technology","Password":"UnitTestUser?12345","IsActivated":"true"}

    The response that I got is:

    {
        "IsError": false,
        "ResponseMessage": "Success",
        "ResponseData": 0
    }
    ResponseData returned a valid id the first time but the following requests only returned 0.
    Can you tell me what I am doing wrong?
  • gskamau

    Hey Dan,

    Try using REST API: Update User Profile Fields to add a user instead. Make sure to add ?addUser=true to the URL to create a new user.

    Grace

  • DanMirandaITx

    Hi Grace,

    I tried your suggestion and I am receiving a 400 bad request response, this is the json that i am sending to the api:

    {
    "Username":"unittestuser2",
    "FirstName":"UnitTest2",
    "LastName":"User2",
    "Email":"UnitTestUser2@testdomain.com",
    "HireDate":"10/10/1990",
    "Occupation":"Sr. Dummy User",
    "ReportsTo":"",
    "BranchDeptName":"Information Technology",
    "Password":"UnitTestUser?12345",
    "IsActivated":"true"
    }

    In the Headers I have Rest-Api-Key with my key and Content-Type with application/json.

    Do you know if something else is required?

    Regards

    Dan

     

  • gskamau
    Answered

    Hey Dan,

    You need to stringify the data for this API. Example: "{\"UserID\":\"12\",\"Company\":\"Axero Solutions\",\"Phone\":\"5625551234\",\"Share my profile\":\"false\"}"

    Grace

     

  • DanMirandaITx

    It is working now, 

    Thank you!

Page 1 of 1 (5 items)